src/Entity/Organization.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClass\App\Repository\OrganizationRepository::class)]
  7. class Organization implements \Stringable
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column(type'integer')]
  12.     private ?int $id 0;
  13.     #[ORM\Column(type'string'length255nullabletrue)]
  14.     private ?string $titlenull;
  15.     #[ORM\Column(type'string'length255nullabletrue)]
  16.     private ?string $subtitlenull;
  17.     #[ORM\Column(type'string'length255nullabletrue)]
  18.     private ?string $picturenull;
  19.     #[ORM\Column(type'text'nullabletrue)]
  20.     private ?string $short_descriptionnull;
  21.     #[ORM\Column(type'text'nullabletrue)]
  22.     private ?string $long_descriptionnull;
  23.     #[ORM\Column(type'string'length255nullabletrue)]
  24.     private ?string $display_namenull;
  25.     #[ORM\ManyToOne(targetEntity\App\Entity\Territory::class, inversedBy'organizations')]
  26.     private mixed $territory;
  27.     #[ORM\Column(type'string'length255nullabletrue)]
  28.     private ?string $opening_hoursnull;
  29.     #[ORM\Column(type'string'length255nullabletrue)]
  30.     private ?string $emailnull;
  31.     #[ORM\Column(type'string'length255nullabletrue)]
  32.     private ?string $phonenull;
  33.     #[ORM\Column(type'string'length255nullabletrue)]
  34.     private ?string $acceonull;
  35.     #[ORM\Column(type'string'length255nullabletrue)]
  36.     private ?string $link_1null;
  37.     #[ORM\Column(type'string'length255nullabletrue)]
  38.     private ?string $link_2null;
  39.     #[ORM\ManyToMany(targetEntity\App\Entity\Post::class, mappedBy'organizations')]
  40.     private mixed $posts;
  41.     #[ORM\OneToMany(targetEntity\App\Entity\Post::class, mappedBy'organisation1')]
  42.     private mixed $posts1;
  43.     #[ORM\OneToMany(targetEntity\App\Entity\Post::class, mappedBy'organisation2')]
  44.     private mixed $posts2;
  45.     #[ORM\OneToMany(targetEntity\App\Entity\Post::class, mappedBy'organisation3')]
  46.     private mixed $posts3;
  47.     #[ORM\Column(type'string'length255nullabletrue)]
  48.     private ?string $typenull;
  49.     #[ORM\Column(type'string'length255nullabletrue)]
  50.     private ?string $latitudenull;
  51.     #[ORM\Column(type'string'length255nullabletrue)]
  52.     private ?string $longitudenull;
  53.     #[ORM\Column(type'text'nullabletrue)]
  54.     private ?string $multipointsnull;
  55.     #[ORM\Column(type'string'length255nullabletrue)]
  56.     private ?string $ruenull;
  57.     #[ORM\Column(type'string'length255nullabletrue)]
  58.     private ?string $code_postalnull;
  59.     #[ORM\Column(type'string'length255nullabletrue)]
  60.     private ?string $villenull;
  61.     #[ORM\OneToMany(targetEntity\App\Entity\Pages::class, mappedBy'organisation1')]
  62.     private mixed $pages1;
  63.     #[ORM\OneToMany(targetEntity\App\Entity\Pages::class, mappedBy'organisation2')]
  64.     private mixed $pages2;
  65.     #[ORM\OneToMany(targetEntity\App\Entity\Pages::class, mappedBy'organisation3')]
  66.     private mixed $pages3;
  67.     #[ORM\ManyToOne(targetEntity\App\Entity\TypeOrganisation::class, inversedBy'organizations')]
  68.     private mixed $type_organisation;
  69.     public function __construct()
  70.     {
  71.         $this->posts = new ArrayCollection();
  72.         $this->posts1 = new ArrayCollection();
  73.         $this->posts2 = new ArrayCollection();
  74.         $this->posts3 = new ArrayCollection();
  75.         $this->pages1 = new ArrayCollection();
  76.         $this->pages2 = new ArrayCollection();
  77.         $this->pages3 = new ArrayCollection();
  78.     }
  79.     public function getId(): ?int
  80.     {
  81.         return $this->id;
  82.     }
  83.     public function getTitle(): ?string
  84.     {
  85.         return $this->title;
  86.     }
  87.     public function setTitle(?string $title): self
  88.     {
  89.         $this->title $title;
  90.         return $this;
  91.     }
  92.     public function getSubtitle(): ?string
  93.     {
  94.         return $this->subtitle;
  95.     }
  96.     public function setSubtitle(?string $subtitle): self
  97.     {
  98.         $this->subtitle $subtitle;
  99.         return $this;
  100.     }
  101.     public function getPicture(): ?string
  102.     {
  103.         return $this->picture;
  104.     }
  105.     public function setPicture(?string $picture): self
  106.     {
  107.         $this->picture $picture;
  108.         return $this;
  109.     }
  110.     public function getShortDescription(): ?string
  111.     {
  112.         return $this->short_description;
  113.     }
  114.     public function setShortDescription(?string $short_description): self
  115.     {
  116.         $this->short_description $short_description;
  117.         return $this;
  118.     }
  119.     public function getLongDescription(): ?string
  120.     {
  121.         return $this->long_description;
  122.     }
  123.     public function setLongDescription(?string $long_description): self
  124.     {
  125.         $this->long_description $long_description;
  126.         return $this;
  127.     }
  128.     public function getDisplayName(): ?string
  129.     {
  130.         return $this->display_name;
  131.     }
  132.     public function setDisplayName(?string $display_name): self
  133.     {
  134.         $this->display_name $display_name;
  135.         return $this;
  136.     }
  137.     public function getTerritory(): ?Territory
  138.     {
  139.         return $this->territory;
  140.     }
  141.     public function setTerritory(?Territory $territory): self
  142.     {
  143.         $this->territory $territory;
  144.         return $this;
  145.     }
  146.     public function getOpeningHours(): ?string
  147.     {
  148.         return $this->opening_hours;
  149.     }
  150.     public function setOpeningHours(?string $opening_hours): self
  151.     {
  152.         $this->opening_hours $opening_hours;
  153.         return $this;
  154.     }
  155.     public function getEmail(): ?string
  156.     {
  157.         return $this->email;
  158.     }
  159.     public function setEmail(?string $email): self
  160.     {
  161.         $this->email $email;
  162.         return $this;
  163.     }
  164.     public function getPhone(): ?string
  165.     {
  166.         return $this->phone;
  167.     }
  168.     public function setPhone(?string $phone): self
  169.     {
  170.         $this->phone $phone;
  171.         return $this;
  172.     }
  173.     public function getAcceo(): ?string
  174.     {
  175.         return $this->acceo;
  176.     }
  177.     public function setAcceo(?string $acceo): self
  178.     {
  179.         $this->acceo $acceo;
  180.         return $this;
  181.     }
  182.     public function getLink1(): ?string
  183.     {
  184.         return $this->link_1;
  185.     }
  186.     public function setLink1(?string $link_1): self
  187.     {
  188.         $this->link_1 $link_1;
  189.         return $this;
  190.     }
  191.     public function getLink2(): ?string
  192.     {
  193.         return $this->link_2;
  194.     }
  195.     public function setLink2(?string $link_2): self
  196.     {
  197.         $this->link_2 $link_2;
  198.         return $this;
  199.     }
  200.     /**
  201.      * @return Collection|Post[]
  202.      */
  203.     public function getPosts(): Collection
  204.     {
  205.         return $this->posts;
  206.     }
  207.     public function addPost(Post $post): self
  208.     {
  209.         if (!$this->posts->contains($post)) {
  210.             $this->posts[] = $post;
  211.             $post->addOrganization($this);
  212.         }
  213.         return $this;
  214.     }
  215.     public function removePost(Post $post): self
  216.     {
  217.         if ($this->posts->contains($post)) {
  218.             $this->posts->removeElement($post);
  219.             $post->removeOrganization($this);
  220.         }
  221.         return $this;
  222.     }
  223.     /**
  224.      * @return Collection|Post[]
  225.      */
  226.     public function getPosts1(): Collection
  227.     {
  228.         return $this->posts1;
  229.     }
  230.     public function addPosts1(Post $posts1): self
  231.     {
  232.         if (!$this->posts1->contains($posts1)) {
  233.             $this->posts1[] = $posts1;
  234.             $posts1->setOrganisation1($this);
  235.         }
  236.         return $this;
  237.     }
  238.     public function removePosts1(Post $posts1): self
  239.     {
  240.         if ($this->posts1->contains($posts1)) {
  241.             $this->posts1->removeElement($posts1);
  242.             // set the owning side to null (unless already changed)
  243.             if ($posts1->getOrganisation1() === $this) {
  244.                 $posts1->setOrganisation1(null);
  245.             }
  246.         }
  247.         return $this;
  248.     }
  249.     /**
  250.      * @return Collection|Post[]
  251.      */
  252.     public function getPosts2(): Collection
  253.     {
  254.         return $this->posts2;
  255.     }
  256.     public function addPosts2(Post $posts2): self
  257.     {
  258.         if (!$this->posts2->contains($posts2)) {
  259.             $this->posts2[] = $posts2;
  260.             $posts2->setOrganisation2($this);
  261.         }
  262.         return $this;
  263.     }
  264.     public function removePosts2(Post $posts2): self
  265.     {
  266.         if ($this->posts2->contains($posts2)) {
  267.             $this->posts2->removeElement($posts2);
  268.             // set the owning side to null (unless already changed)
  269.             if ($posts2->getOrganisation2() === $this) {
  270.                 $posts2->setOrganisation2(null);
  271.             }
  272.         }
  273.         return $this;
  274.     }
  275.     /**
  276.      * @return Collection|Post[]
  277.      */
  278.     public function getPosts3(): Collection
  279.     {
  280.         return $this->posts3;
  281.     }
  282.     public function addPosts3(Post $posts3): self
  283.     {
  284.         if (!$this->posts3->contains($posts3)) {
  285.             $this->posts3[] = $posts3;
  286.             $posts3->setOrganisation3($this);
  287.         }
  288.         return $this;
  289.     }
  290.     public function removePosts3(Post $posts3): self
  291.     {
  292.         if ($this->posts3->contains($posts3)) {
  293.             $this->posts3->removeElement($posts3);
  294.             // set the owning side to null (unless already changed)
  295.             if ($posts3->getOrganisation3() === $this) {
  296.                 $posts3->setOrganisation3(null);
  297.             }
  298.         }
  299.         return $this;
  300.     }
  301.     public function __toString(): string
  302.     {
  303.         return $this->title ' ' $this->ville;
  304.     }
  305.     public function getType(): ?string
  306.     {
  307.         return $this->type;
  308.     }
  309.     public function setType(?string $type): self
  310.     {
  311.         $this->type $type;
  312.         return $this;
  313.     }
  314.     public function getLatitude(): ?string
  315.     {
  316.         return $this->latitude;
  317.     }
  318.     public function setLatitude(?string $latitude): self
  319.     {
  320.         $this->latitude $latitude;
  321.         return $this;
  322.     }
  323.     public function getLongitude(): ?string
  324.     {
  325.         return $this->longitude;
  326.     }
  327.     public function setLongitude(?string $longitude): self
  328.     {
  329.         $this->longitude $longitude;
  330.         return $this;
  331.     }
  332.     public function getMultipoints(): ?string
  333.     {
  334.         return $this->multipoints;
  335.     }
  336.     public function setMultipoints(?string $multipoints): self
  337.     {
  338.         $this->multipoints $multipoints;
  339.         return $this;
  340.     }
  341.     public function getRue(): ?string
  342.     {
  343.         return $this->rue;
  344.     }
  345.     public function setRue(?string $rue): self
  346.     {
  347.         $this->rue $rue;
  348.         return $this;
  349.     }
  350.     public function getCodePostal(): ?string
  351.     {
  352.         return $this->code_postal;
  353.     }
  354.     public function setCodePostal(?string $code_postal): self
  355.     {
  356.         $this->code_postal $code_postal;
  357.         return $this;
  358.     }
  359.     public function getVille(): ?string
  360.     {
  361.         return $this->ville;
  362.     }
  363.     public function setVille(?string $ville): self
  364.     {
  365.         $this->ville $ville;
  366.         return $this;
  367.     }
  368.     /**
  369.      * @return Collection|Pages[]
  370.      */
  371.     public function getPages1(): Collection
  372.     {
  373.         return $this->pages1;
  374.     }
  375.     public function addPages1(Pages $pages1): self
  376.     {
  377.         if (!$this->pages1->contains($pages1)) {
  378.             $this->pages1[] = $pages1;
  379.             $pages1->setOrganisation1($this);
  380.         }
  381.         return $this;
  382.     }
  383.     public function removePages1(Pages $pages1): self
  384.     {
  385.         if ($this->pages1->contains($pages1)) {
  386.             $this->pages1->removeElement($pages1);
  387.             // set the owning side to null (unless already changed)
  388.             if ($pages1->getOrganisation1() === $this) {
  389.                 $pages1->setOrganisation1(null);
  390.             }
  391.         }
  392.         return $this;
  393.     }
  394.     /**
  395.      * @return Collection|Pages[]
  396.      */
  397.     public function getPages2(): Collection
  398.     {
  399.         return $this->pages2;
  400.     }
  401.     public function addPages2(Pages $pages2): self
  402.     {
  403.         if (!$this->pages2->contains($pages2)) {
  404.             $this->pages2[] = $pages2;
  405.             $pages2->setOrganisation2($this);
  406.         }
  407.         return $this;
  408.     }
  409.     public function removePages2(Pages $pages2): self
  410.     {
  411.         if ($this->pages2->contains($pages2)) {
  412.             $this->pages2->removeElement($pages2);
  413.             // set the owning side to null (unless already changed)
  414.             if ($pages2->getOrganisation2() === $this) {
  415.                 $pages2->setOrganisation2(null);
  416.             }
  417.         }
  418.         return $this;
  419.     }
  420.     /**
  421.      * @return Collection|Pages[]
  422.      */
  423.     public function getPages3(): Collection
  424.     {
  425.         return $this->pages3;
  426.     }
  427.     public function addPages3(Pages $pages3): self
  428.     {
  429.         if (!$this->pages3->contains($pages3)) {
  430.             $this->pages3[] = $pages3;
  431.             $pages3->setOrganisation3($this);
  432.         }
  433.         return $this;
  434.     }
  435.     public function removePages3(Pages $pages3): self
  436.     {
  437.         if ($this->pages3->contains($pages3)) {
  438.             $this->pages3->removeElement($pages3);
  439.             // set the owning side to null (unless already changed)
  440.             if ($pages3->getOrganisation3() === $this) {
  441.                 $pages3->setOrganisation3(null);
  442.             }
  443.         }
  444.         return $this;
  445.     }
  446.     public function getTypeOrganisation(): ?TypeOrganisation
  447.     {
  448.         return $this->type_organisation;
  449.     }
  450.     public function setTypeOrganisation(?TypeOrganisation $type_organisation): self
  451.     {
  452.         $this->type_organisation $type_organisation;
  453.         return $this;
  454.     }
  455. }