| Current Path : /var/www/v3.cesa.co.za/src/EventBundle/Entity/ |
| Current File : /var/www/v3.cesa.co.za/src/EventBundle/Entity/SchoolWebCategory.php |
<?php
namespace App\EventBundle\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* SchoolWebCategory
*
* @ORM\Table(name="SchoolWebCategories")
* @ORM\Entity(repositoryClass="App\EventBundle\Repository\SchoolWebCategoryRepository")
*/
class SchoolWebCategory
{
/**
* @ORM\Id
* @ORM\Column(name="WebCategoryID", type="integer")
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
/**
* @ORM\Column(name="WebCategoryName", type="string", length=255, nullable=true)
*/
private $web_category_name;
/**
* @ORM\Column(name="DisplayOrder", type="integer", nullable=false, options={"default": 0})
*/
private $display_order;
/**
* @ORM\OneToMany(targetEntity="SchoolCourse", mappedBy="school_web_category")
*/
private $school_course;
/**
* @ORM\OneToMany(targetEntity="SchoolEvent", mappedBy="school_web_category")
*/
private $school_event;
public function __construct()
{
$this->school_course = new ArrayCollection();
$this->school_event = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getWebCategoryName(): ?string
{
return $this->web_category_name;
}
public function setWebCategoryName(?string $web_category_name): static
{
$this->web_category_name = $web_category_name;
return $this;
}
public function getDisplayOrder(): ?int
{
return $this->display_order;
}
public function setDisplayOrder(int $display_order): static
{
$this->display_order = $display_order;
return $this;
}
/**
* @return Collection<int, SchoolCourse>
*/
public function getSchoolCourse(): Collection
{
return $this->school_course;
}
public function addSchoolCourse(SchoolCourse $schoolCourse): static
{
if (!$this->school_course->contains($schoolCourse)) {
$this->school_course->add($schoolCourse);
$schoolCourse->setSchoolWebCategory($this);
}
return $this;
}
public function removeSchoolCourse(SchoolCourse $schoolCourse): static
{
if ($this->school_course->removeElement($schoolCourse)) {
// set the owning side to null (unless already changed)
if ($schoolCourse->getSchoolWebCategory() === $this) {
$schoolCourse->setSchoolWebCategory(null);
}
}
return $this;
}
/**
* @return Collection<int, SchoolEvent>
*/
public function getSchoolEvent(): Collection
{
return $this->school_event;
}
public function addSchoolEvent(SchoolEvent $schoolEvent): static
{
if (!$this->school_event->contains($schoolEvent)) {
$this->school_event->add($schoolEvent);
$schoolEvent->setSchoolWebCategory($this);
}
return $this;
}
public function removeSchoolEvent(SchoolEvent $schoolEvent): static
{
if ($this->school_event->removeElement($schoolEvent)) {
// set the owning side to null (unless already changed)
if ($schoolEvent->getSchoolWebCategory() === $this) {
$schoolEvent->setSchoolWebCategory(null);
}
}
return $this;
}
}