src/Entity/RssArticle.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\RssArticleRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassRssArticleRepository::class)]
  8. class RssArticle implements \Stringable
  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'rssArticles')]
  19.     private mixed $posts;
  20.     #[ORM\Column(type'text'nullabletrue)]
  21.     private ?string $motsclesnull;
  22.     #[ORM\ManyToMany(targetEntityTopic::class, inversedBy'rssArticles')]
  23.     private mixed $thematiques;
  24.     #[ORM\ManyToMany(targetEntityTerritory::class, inversedBy'rssArticles')]
  25.     private mixed $lieux;
  26.     #[ORM\Column(type'boolean'nullabletrue)]
  27.     private ?bool $video;
  28.     #[ORM\Column(type'text'nullabletrue)]
  29.     private ?string $descriptionnull;
  30.     #[ORM\Column(type'text'nullabletrue)]
  31.     private ?string $widgetnull;
  32.     #[ORM\JoinTable(name'rss_article_posts_exclus')]
  33.     #[ORM\ManyToMany(targetEntityPost::class, inversedBy'rssArticlesExclus')]
  34.     private mixed $posts_exclus;
  35.     #[ORM\OneToMany(targetEntityPageAccueil::class, mappedBy'nordinfo_rss')]
  36.     private mixed $pageAccueils;
  37.     #[ORM\OneToMany(targetEntityPolitiqueDepartementale::class, mappedBy'nordinfo_rss')]
  38.     private mixed $politiqueDepartementales;
  39.     #[ORM\OneToMany(targetEntityPageAccueilService::class, mappedBy'url_rss_nordinfo')]
  40.     private mixed $pageAccueilServices;
  41.     #[ORM\OneToMany(targetEntityPages::class, mappedBy'nordinfo_rss')]
  42.     private mixed $pages;
  43.     #[ORM\OneToMany(mappedBy'nordinfo_rss'targetEntityPageSatellite::class)]
  44.     private Collection $pageSatellites;
  45.     public function __construct()
  46.     {
  47.         $this->posts = new ArrayCollection();
  48.         $this->thematiques = new ArrayCollection();
  49.         $this->lieux = new ArrayCollection();
  50.         $this->posts_exclus = new ArrayCollection();
  51.         $this->pageAccueils = new ArrayCollection();
  52.         $this->politiqueDepartementales = new ArrayCollection();
  53.         $this->pageAccueilServices = new ArrayCollection();
  54.         $this->pages = new ArrayCollection();
  55.         $this->pageSatellites = new ArrayCollection();
  56.     }
  57.     public function getId(): ?int
  58.     {
  59.         return $this->id;
  60.     }
  61.     public function getName(): ?string
  62.     {
  63.         return $this->name;
  64.     }
  65.     public function setName(?string $name): self
  66.     {
  67.         $this->name $name;
  68.         return $this;
  69.     }
  70.     public function getAlias(): ?string
  71.     {
  72.         return $this->alias;
  73.     }
  74.     public function setAlias(?string $alias): self
  75.     {
  76.         $this->alias $alias;
  77.         return $this;
  78.     }
  79.     /**
  80.      * @return Collection|Post[]
  81.      */
  82.     public function getPosts(): Collection
  83.     {
  84.         return $this->posts;
  85.     }
  86.     public function addPost(Post $post): self
  87.     {
  88.         if (!$this->posts->contains($post)) {
  89.             $this->posts[] = $post;
  90.         }
  91.         return $this;
  92.     }
  93.     public function removePost(Post $post): self
  94.     {
  95.         if ($this->posts->contains($post)) {
  96.             $this->posts->removeElement($post);
  97.         }
  98.         return $this;
  99.     }
  100.     public function getMotscles(): ?string
  101.     {
  102.         return $this->motscles;
  103.     }
  104.     public function setMotscles(?string $motscles): self
  105.     {
  106.         $this->motscles $motscles;
  107.         return $this;
  108.     }
  109.     /**
  110.      * @return Collection|Topic[]
  111.      */
  112.     public function getThematiques(): Collection
  113.     {
  114.         return $this->thematiques;
  115.     }
  116.     public function addThematique(Topic $thematique): self
  117.     {
  118.         if (!$this->thematiques->contains($thematique)) {
  119.             $this->thematiques[] = $thematique;
  120.         }
  121.         return $this;
  122.     }
  123.     public function removeThematique(Topic $thematique): self
  124.     {
  125.         if ($this->thematiques->contains($thematique)) {
  126.             $this->thematiques->removeElement($thematique);
  127.         }
  128.         return $this;
  129.     }
  130.     /**
  131.      * @return Collection|Territory[]
  132.      */
  133.     public function getLieux(): Collection
  134.     {
  135.         return $this->lieux;
  136.     }
  137.     public function addLieux(Territory $lieux): self
  138.     {
  139.         if (!$this->lieux->contains($lieux)) {
  140.             $this->lieux[] = $lieux;
  141.         }
  142.         return $this;
  143.     }
  144.     public function removeLieux(Territory $lieux): self
  145.     {
  146.         if ($this->lieux->contains($lieux)) {
  147.             $this->lieux->removeElement($lieux);
  148.         }
  149.         return $this;
  150.     }
  151.     public function getVideo(): ?bool
  152.     {
  153.         return $this->video;
  154.     }
  155.     public function setVideo(?bool $video): self
  156.     {
  157.         $this->video $video;
  158.         return $this;
  159.     }
  160.     public function getDescription(): ?string
  161.     {
  162.         return $this->description;
  163.     }
  164.     public function setDescription(?string $description): self
  165.     {
  166.         $this->description $description;
  167.         return $this;
  168.     }
  169.     public function getWidget(): ?string
  170.     {
  171.         return $this->widget;
  172.     }
  173.     public function setWidget(?string $widget): self
  174.     {
  175.         $this->widget $widget;
  176.         return $this;
  177.     }
  178.     /**
  179.      * @return Collection|Post[]
  180.      */
  181.     public function getPostsExclus(): Collection
  182.     {
  183.         return $this->posts_exclus;
  184.     }
  185.     public function addPostsExclu(Post $postsExclu): self
  186.     {
  187.         if (!$this->posts_exclus->contains($postsExclu)) {
  188.             $this->posts_exclus[] = $postsExclu;
  189.         }
  190.         return $this;
  191.     }
  192.     public function removePostsExclu(Post $postsExclu): self
  193.     {
  194.         $this->posts_exclus->removeElement($postsExclu);
  195.         return $this;
  196.     }
  197.     /**
  198.      * @return Collection|PageAccueil[]
  199.      */
  200.     public function getPageAccueils(): Collection
  201.     {
  202.         return $this->pageAccueils;
  203.     }
  204.     public function addPageAccueil(PageAccueil $pageAccueil): self
  205.     {
  206.         if (!$this->pageAccueils->contains($pageAccueil)) {
  207.             $this->pageAccueils[] = $pageAccueil;
  208.             $pageAccueil->setNordinfoRss($this);
  209.         }
  210.         return $this;
  211.     }
  212.     public function removePageAccueil(PageAccueil $pageAccueil): self
  213.     {
  214.         if ($this->pageAccueils->removeElement($pageAccueil)) {
  215.             // set the owning side to null (unless already changed)
  216.             if ($pageAccueil->getNordinfoRss() === $this) {
  217.                 $pageAccueil->setNordinfoRss(null);
  218.             }
  219.         }
  220.         return $this;
  221.     }
  222.     /**
  223.      * @return Collection|PolitiqueDepartementale[]
  224.      */
  225.     public function getPolitiqueDepartementales(): Collection
  226.     {
  227.         return $this->politiqueDepartementales;
  228.     }
  229.     public function addPolitiqueDepartementale(PolitiqueDepartementale $politiqueDepartementale): self
  230.     {
  231.         if (!$this->politiqueDepartementales->contains($politiqueDepartementale)) {
  232.             $this->politiqueDepartementales[] = $politiqueDepartementale;
  233.             $politiqueDepartementale->setNordinfoRss($this);
  234.         }
  235.         return $this;
  236.     }
  237.     public function removePolitiqueDepartementale(PolitiqueDepartementale $politiqueDepartementale): self
  238.     {
  239.         if ($this->politiqueDepartementales->removeElement($politiqueDepartementale)) {
  240.             // set the owning side to null (unless already changed)
  241.             if ($politiqueDepartementale->getNordinfoRss() === $this) {
  242.                 $politiqueDepartementale->setNordinfoRss(null);
  243.             }
  244.         }
  245.         return $this;
  246.     }
  247.     public function __toString(): string
  248.     {
  249.         return (string) $this->name;
  250.     }
  251.     /**
  252.      * @return Collection|PageAccueilService[]
  253.      */
  254.     public function getPageAccueilServices(): Collection
  255.     {
  256.         return $this->pageAccueilServices;
  257.     }
  258.     public function addPageAccueilService(PageAccueilService $pageAccueilService): self
  259.     {
  260.         if (!$this->pageAccueilServices->contains($pageAccueilService)) {
  261.             $this->pageAccueilServices[] = $pageAccueilService;
  262.             $pageAccueilService->setUrlRssNordinfo($this);
  263.         }
  264.         return $this;
  265.     }
  266.     public function removePageAccueilService(PageAccueilService $pageAccueilService): self
  267.     {
  268.         if ($this->pageAccueilServices->removeElement($pageAccueilService)) {
  269.             // set the owning side to null (unless already changed)
  270.             if ($pageAccueilService->getUrlRssNordinfo() === $this) {
  271.                 $pageAccueilService->setUrlRssNordinfo(null);
  272.             }
  273.         }
  274.         return $this;
  275.     }
  276.     /**
  277.      * @return Collection|Pages[]
  278.      */
  279.     public function getPages(): Collection
  280.     {
  281.         return $this->pages;
  282.     }
  283.     public function addPage(Pages $page): self
  284.     {
  285.         if (!$this->pages->contains($page)) {
  286.             $this->pages[] = $page;
  287.             $page->setNordinfoRss($this);
  288.         }
  289.         return $this;
  290.     }
  291.     public function removePage(Pages $page): self
  292.     {
  293.         if ($this->pages->removeElement($page)) {
  294.             // set the owning side to null (unless already changed)
  295.             if ($page->getNordinfoRss() === $this) {
  296.                 $page->setNordinfoRss(null);
  297.             }
  298.         }
  299.         return $this;
  300.     }
  301.     /**
  302.      * @return Collection<int, PageSatellite>
  303.      */
  304.     public function getPageSatellites(): Collection
  305.     {
  306.         return $this->pageSatellites;
  307.     }
  308.     public function addPageSatellite(PageSatellite $pageSatellite): self
  309.     {
  310.         if (!$this->pageSatellites->contains($pageSatellite)) {
  311.             $this->pageSatellites->add($pageSatellite);
  312.             $pageSatellite->setNordinfoRss($this);
  313.         }
  314.         return $this;
  315.     }
  316.     public function removePageSatellite(PageSatellite $pageSatellite): self
  317.     {
  318.         if ($this->pageSatellites->removeElement($pageSatellite)) {
  319.             // set the owning side to null (unless already changed)
  320.             if ($pageSatellite->getNordinfoRss() === $this) {
  321.                 $pageSatellite->setNordinfoRss(null);
  322.             }
  323.         }
  324.         return $this;
  325.     }
  326. }