src/Entity/RssEvent.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\RssEventRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassRssEventRepository::class)]
  8. class RssEvent
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column(type'integer')]
  13.     private ?int $id 0;
  14.     #[ORM\Column(type'string'length255nullabletrue)]
  15.     private ?string $namenull;
  16.     #[ORM\Column(type'string'length255nullabletrue)]
  17.     private ?string  $aliasnull;
  18.     #[ORM\ManyToMany(targetEntityPost::class, inversedBy'rssEvents')]
  19.     private mixed $posts;
  20.     #[ORM\Column(type'text'nullabletrue)]
  21.     private ?string $motsclesnull;
  22.     #[ORM\ManyToMany(targetEntityTopic::class, inversedBy'rssEvents')]
  23.     private mixed $thematiques;
  24.     #[ORM\ManyToMany(targetEntityTerritory::class, inversedBy'rssEvents')]
  25.     private mixed $lieux;
  26.     #[ORM\Column(type'text'nullabletrue)]
  27.     private ?string $descriptionnull;
  28.     #[ORM\JoinTable(name'rss_events_posts_exclus')]
  29.     #[ORM\ManyToMany(targetEntityPost::class, inversedBy'rssEventsExclus')]
  30.     private mixed $posts_exclus;
  31.     #[ORM\Column(type'text'nullabletrue)]
  32.     private ?string $widgetnull;
  33.     public function __construct()
  34.     {
  35.         $this->posts = new ArrayCollection();
  36.         $this->thematiques = new ArrayCollection();
  37.         $this->lieux = new ArrayCollection();
  38.         $this->posts_exclus = new ArrayCollection();
  39.     }
  40.     public function getId(): ?int
  41.     {
  42.         return $this->id;
  43.     }
  44.     public function getName(): ?string
  45.     {
  46.         return $this->name;
  47.     }
  48.     public function setName(?string $name): self
  49.     {
  50.         $this->name $name;
  51.         return $this;
  52.     }
  53.     public function getAlias(): ?string
  54.     {
  55.         return $this->alias;
  56.     }
  57.     public function setAlias(?string $alias): self
  58.     {
  59.         $this->alias $alias;
  60.         return $this;
  61.     }
  62.     /**
  63.      * @return Collection|Post[]
  64.      */
  65.     public function getPosts(): Collection
  66.     {
  67.         return $this->posts;
  68.     }
  69.     public function addPost(Post $post): self
  70.     {
  71.         if (!$this->posts->contains($post)) {
  72.             $this->posts[] = $post;
  73.         }
  74.         return $this;
  75.     }
  76.     public function removePost(Post $post): self
  77.     {
  78.         if ($this->posts->contains($post)) {
  79.             $this->posts->removeElement($post);
  80.         }
  81.         return $this;
  82.     }
  83.     public function getMotscles(): ?string
  84.     {
  85.         return $this->motscles;
  86.     }
  87.     public function setMotscles(?string $motscles): self
  88.     {
  89.         $this->motscles $motscles;
  90.         return $this;
  91.     }
  92.     /**
  93.      * @return Collection|Topic[]
  94.      */
  95.     public function getThematiques(): Collection
  96.     {
  97.         return $this->thematiques;
  98.     }
  99.     public function addThematique(Topic $thematique): self
  100.     {
  101.         if (!$this->thematiques->contains($thematique)) {
  102.             $this->thematiques[] = $thematique;
  103.         }
  104.         return $this;
  105.     }
  106.     public function removeThematique(Topic $thematique): self
  107.     {
  108.         if ($this->thematiques->contains($thematique)) {
  109.             $this->thematiques->removeElement($thematique);
  110.         }
  111.         return $this;
  112.     }
  113.     /**
  114.      * @return Collection|Territory[]
  115.      */
  116.     public function getLieux(): Collection
  117.     {
  118.         return $this->lieux;
  119.     }
  120.     public function addLieux(Territory $lieux): self
  121.     {
  122.         if (!$this->lieux->contains($lieux)) {
  123.             $this->lieux[] = $lieux;
  124.         }
  125.         return $this;
  126.     }
  127.     public function removeLieux(Territory $lieux): self
  128.     {
  129.         if ($this->lieux->contains($lieux)) {
  130.             $this->lieux->removeElement($lieux);
  131.         }
  132.         return $this;
  133.     }
  134.     public function getDescription(): ?string
  135.     {
  136.         return $this->description;
  137.     }
  138.     public function setDescription(?string $description): self
  139.     {
  140.         $this->description $description;
  141.         return $this;
  142.     }
  143.     /**
  144.      * @return Collection|Post[]
  145.      */
  146.     public function getPostsExclus(): Collection
  147.     {
  148.         return $this->posts_exclus;
  149.     }
  150.     public function addPostsExclu(Post $postsExclu): self
  151.     {
  152.         if (!$this->posts_exclus->contains($postsExclu)) {
  153.             $this->posts_exclus[] = $postsExclu;
  154.         }
  155.         return $this;
  156.     }
  157.     public function removePostsExclu(Post $postsExclu): self
  158.     {
  159.         $this->posts_exclus->removeElement($postsExclu);
  160.         return $this;
  161.     }
  162.     public function getWidget(): ?string
  163.     {
  164.         return $this->widget;
  165.     }
  166.     public function setWidget(?string $widget): self
  167.     {
  168.         $this->widget $widget;
  169.         return $this;
  170.     }
  171. }