src/Entity/CategorySeance.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\CategorySeanceRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. #[ORM\Entity(repositoryClassCategorySeanceRepository::class)]
  9. class CategorySeance
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column(length255)]
  16.     private ?string $label null;
  17.     #[ORM\Column(typeTypes::DATE_MUTABLE)]
  18.     private ?\DateTimeInterface $creationDate null;
  19.     #[ORM\Column(typeTypes::DATE_MUTABLE)]
  20.     private ?\DateTimeInterface $modificationDate null;
  21.     #[ORM\OneToMany(mappedBy'category'targetEntitySeance::class)]
  22.     private Collection $seances;
  23.     #[ORM\Column(length255nullabletrue)]
  24.     private ?string $image null;
  25.     #[ORM\Column(length255)]
  26.     private ?string $slug null;
  27.     #[ORM\Column(length255nullabletrue)]
  28.     private ?string $reservationLink null;
  29.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  30.     private ?string $presentation null;
  31.     #[ORM\Column(length2048nullabletrue)]
  32.     private ?string $subtitle null;
  33.     #[ORM\OneToMany(mappedBy'categorySeance'targetEntityFaq::class)]
  34.     private Collection $faqs;
  35.     #[ORM\Column]
  36.     private ?bool $isActive true;
  37.     #[ORM\Column(nullabletrue)]
  38.     private ?int $ordre null;
  39.     #[ORM\Column(length255nullabletrue)]
  40.     private ?string $miniature null;
  41.     #[ORM\Column(typeTypes::SIMPLE_ARRAYnullabletrue)]
  42.     private array $galleryImages = [];
  43.     public function __construct()
  44.     {
  45.         $this->seances = new ArrayCollection();
  46.         $this->faqs = new ArrayCollection();
  47.     }
  48.     public function getId(): ?int
  49.     {
  50.         return $this->id;
  51.     }
  52.     public function getLabel(): ?string
  53.     {
  54.         return $this->label;
  55.     }
  56.     public function setLabel(string $label): self
  57.     {
  58.         $this->label $label;
  59.         return $this;
  60.     }
  61.     /**
  62.      * toString
  63.      * @return string
  64.      */
  65.     public function __toString()
  66.     {
  67.         return $this->getLabel();
  68.     }
  69.     public function getCreationDate(): ?\DateTimeInterface
  70.     {
  71.         return $this->creationDate;
  72.     }
  73.     public function setCreationDate(\DateTimeInterface $creationDate): self
  74.     {
  75.         $this->creationDate $creationDate;
  76.         return $this;
  77.     }
  78.     public function getModificationDate(): ?\DateTimeInterface
  79.     {
  80.         return $this->modificationDate;
  81.     }
  82.     public function setModificationDate(\DateTimeInterface $modificationDate): self
  83.     {
  84.         $this->modificationDate $modificationDate;
  85.         return $this;
  86.     }
  87.     /**
  88.      * @return Collection<int, Seance>
  89.      */
  90.     public function getSeances(): Collection
  91.     {
  92.         return $this->seances;
  93.     }
  94.     public function addSeance(Seance $seance): self
  95.     {
  96.         if (!$this->seances->contains($seance)) {
  97.             $this->seances->add($seance);
  98.             $seance->setCategory($this);
  99.         }
  100.         return $this;
  101.     }
  102.     public function removeSeance(Seance $seance): self
  103.     {
  104.         if ($this->seances->removeElement($seance)) {
  105.             // set the owning side to null (unless already changed)
  106.             if ($seance->getCategory() === $this) {
  107.                 $seance->setCategory(null);
  108.             }
  109.         }
  110.         return $this;
  111.     }
  112.     public function getImage(): ?string
  113.     {
  114.         return $this->image;
  115.     }
  116.     public function setImage(?string $image): self
  117.     {
  118.         $this->image $image;
  119.         return $this;
  120.     }
  121.     public function getSlug(): ?string
  122.     {
  123.         return $this->slug;
  124.     }
  125.     public function setSlug(string $slug): self
  126.     {
  127.         $this->slug $slug;
  128.         return $this;
  129.     }
  130.     public function getReservationLink(): ?string
  131.     {
  132.         return $this->reservationLink;
  133.     }
  134.     public function setReservationLink(?string $reservationLink): self
  135.     {
  136.         $this->reservationLink $reservationLink;
  137.         return $this;
  138.     }
  139.     public function getPresentation(): ?string
  140.     {
  141.         return $this->presentation;
  142.     }
  143.     public function setPresentation(?string $presentation): self
  144.     {
  145.         $this->presentation $presentation;
  146.         return $this;
  147.     }
  148.     public function getSubtitle(): ?string
  149.     {
  150.         return $this->subtitle;
  151.     }
  152.     public function setSubtitle(?string $subtitle): self
  153.     {
  154.         $this->subtitle $subtitle;
  155.         return $this;
  156.     }
  157.     /**
  158.      * @return Collection<int, Faq>
  159.      */
  160.     public function getFaqs(): Collection
  161.     {
  162.         return $this->faqs;
  163.     }
  164.     public function addFaq(Faq $faq): self
  165.     {
  166.         if (!$this->faqs->contains($faq)) {
  167.             $this->faqs->add($faq);
  168.             $faq->setCategorySeance($this);
  169.         }
  170.         return $this;
  171.     }
  172.     public function removeFaq(Faq $faq): self
  173.     {
  174.         if ($this->faqs->removeElement($faq)) {
  175.             // set the owning side to null (unless already changed)
  176.             if ($faq->getCategorySeance() === $this) {
  177.                 $faq->setCategorySeance(null);
  178.             }
  179.         }
  180.         return $this;
  181.     }
  182.     public function isIsActive(): ?bool
  183.     {
  184.         return $this->isActive;
  185.     }
  186.     public function setIsActive(bool $isActive): self
  187.     {
  188.         $this->isActive $isActive;
  189.         return $this;
  190.     }
  191.     public function getOrdre(): ?int
  192.     {
  193.         return $this->ordre;
  194.     }
  195.     public function setOrdre(?int $ordre): self
  196.     {
  197.         $this->ordre $ordre;
  198.         return $this;
  199.     }
  200.     public function getMiniature(): ?string
  201.     {
  202.         return $this->miniature;
  203.     }
  204.     public function setMiniature(?string $miniature): self
  205.     {
  206.         $this->miniature $miniature;
  207.         return $this;
  208.     }
  209.     public function getGalleryImages(): array
  210.     {
  211.         return $this->galleryImages;
  212.     }
  213.     public function setGalleryImages(?array $galleryImages): self
  214.     {
  215.         if ($galleryImages == null) {
  216.             $this->galleryImages = [];
  217.         } else {
  218.             $this->galleryImages $galleryImages;
  219.         }
  220.         return $this;
  221.     }
  222. }