src/Entity/EvenementNewsletter.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use ApiPlatform\Core\Annotation\ApiResource;
  4. use App\Repository\EvenementNewsletterRepository;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\Common\Collections\Collection;
  7. use Doctrine\DBAL\Types\Types;
  8. use Doctrine\ORM\Mapping as ORM;
  9. #[ORM\Entity(repositoryClassEvenementNewsletterRepository::class)]
  10. #[ApiResource]
  11. class EvenementNewsletter
  12. {
  13.     #[ORM\Id]
  14.     #[ORM\GeneratedValue]
  15.     #[ORM\Column]
  16.     private ?int $id null;
  17.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  18.     private ?string $description null;
  19.     #[ORM\Column(length255nullabletrue)]
  20.     private ?string $objet null;
  21.     #[ORM\Column(length255nullabletrue)]
  22.     private ?string $affiche null;
  23.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  24.     private ?\DateTimeInterface $datesend null;
  25.     #[ORM\OneToMany(mappedBy'news'targetEntityPieceNews::class,cascade: ['remove'])]
  26.     private Collection $pieceNews;
  27.     #[ORM\Column(nullabletrue)]
  28.     private ?bool $isPartenaire null;
  29.     #[ORM\Column(nullabletrue)]
  30.     private ?bool $isStagiaire null;
  31.     #[ORM\Column(nullabletrue)]
  32.     private ?bool $isFormateur null;
  33.     #[ORM\Column(nullabletrue)]
  34.     private ?bool $isTous null;
  35.     #[ORM\Column(nullabletrue)]
  36.     private array $tabsession = [];
  37.     #[ORM\OneToMany(mappedBy'newsletter'targetEntityTrace::class,cascade: ['remove'])]
  38.     private Collection $traces;
  39.     public function __construct()
  40.     {
  41.         $this->pieceNews = new ArrayCollection();
  42.         $this->traces = new ArrayCollection();
  43.     }
  44.     public function getId(): ?int
  45.     {
  46.         return $this->id;
  47.     }
  48.     public function getDescription(): ?string
  49.     {
  50.         return $this->description;
  51.     }
  52.     public function setDescription(?string $description): self
  53.     {
  54.         $this->description $description;
  55.         return $this;
  56.     }
  57.     public function getObjet(): ?string
  58.     {
  59.         return $this->objet;
  60.     }
  61.     public function setObjet(?string $objet): self
  62.     {
  63.         $this->objet $objet;
  64.         return $this;
  65.     }
  66.     public function getAffiche(): ?string
  67.     {
  68.         return $this->affiche;
  69.     }
  70.     public function setAffiche(?string $affiche): self
  71.     {
  72.         $this->affiche $affiche;
  73.         return $this;
  74.     }
  75.     public function getDatesend(): ?\DateTimeInterface
  76.     {
  77.         return $this->datesend;
  78.     }
  79.     public function setDatesend(?\DateTimeInterface $datesend): self
  80.     {
  81.         $this->datesend $datesend;
  82.         return $this;
  83.     }
  84.     /**
  85.      * @return Collection<int, PieceNews>
  86.      */
  87.     public function getPieceNews(): Collection
  88.     {
  89.         return $this->pieceNews;
  90.     }
  91.     public function addPieceNews(PieceNews $pieceNews): self
  92.     {
  93.         if (!$this->pieceNews->contains($pieceNews)) {
  94.             $this->pieceNews->add($pieceNews);
  95.             $pieceNews->setNews($this);
  96.         }
  97.         return $this;
  98.     }
  99.     public function removePieceNews(PieceNews $pieceNews): self
  100.     {
  101.         if ($this->pieceNews->removeElement($pieceNews)) {
  102.             // set the owning side to null (unless already changed)
  103.             if ($pieceNews->getNews() === $this) {
  104.                 $pieceNews->setNews(null);
  105.             }
  106.         }
  107.         return $this;
  108.     }
  109.     public function isIsPartenaire(): ?bool
  110.     {
  111.         return $this->isPartenaire;
  112.     }
  113.     public function setIsPartenaire(?bool $isPartenaire): self
  114.     {
  115.         $this->isPartenaire $isPartenaire;
  116.         return $this;
  117.     }
  118.     public function isIsStagiaire(): ?bool
  119.     {
  120.         return $this->isStagiaire;
  121.     }
  122.     public function setIsStagiaire(?bool $isStagiaire): self
  123.     {
  124.         $this->isStagiaire $isStagiaire;
  125.         return $this;
  126.     }
  127.     public function isIsFormateur(): ?bool
  128.     {
  129.         return $this->isFormateur;
  130.     }
  131.     public function setIsFormateur(?bool $isFormateur): self
  132.     {
  133.         $this->isFormateur $isFormateur;
  134.         return $this;
  135.     }
  136.     public function isIsTous(): ?bool
  137.     {
  138.         return $this->isTous;
  139.     }
  140.     public function setIsTous(?bool $isTous): self
  141.     {
  142.         $this->isTous $isTous;
  143.         return $this;
  144.     }
  145.     public function getTabsession(): array
  146.     {
  147.         return $this->tabsession;
  148.     }
  149.     public function setTabsession(?array $tabsession): self
  150.     {
  151.         $this->tabsession $tabsession;
  152.         return $this;
  153.     }
  154.     /**
  155.      * @return Collection<int, Trace>
  156.      */
  157.     public function getTraces(): Collection
  158.     {
  159.         return $this->traces;
  160.     }
  161.     public function addTrace(Trace $trace): self
  162.     {
  163.         if (!$this->traces->contains($trace)) {
  164.             $this->traces->add($trace);
  165.             $trace->setNewsletter($this);
  166.         }
  167.         return $this;
  168.     }
  169.     public function removeTrace(Trace $trace): self
  170.     {
  171.         if ($this->traces->removeElement($trace)) {
  172.             // set the owning side to null (unless already changed)
  173.             if ($trace->getNewsletter() === $this) {
  174.                 $trace->setNewsletter(null);
  175.             }
  176.         }
  177.         return $this;
  178.     }
  179. }