<?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: \App\Repository\OrganizationRepository::class)]
class Organization implements \Stringable
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private ?int $id = 0;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $title= null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $subtitle= null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $picture= null;
#[ORM\Column(type: 'text', nullable: true)]
private ?string $short_description= null;
#[ORM\Column(type: 'text', nullable: true)]
private ?string $long_description= null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $display_name= null;
#[ORM\ManyToOne(targetEntity: \App\Entity\Territory::class, inversedBy: 'organizations')]
private mixed $territory;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $opening_hours= null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $email= null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $phone= null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $acceo= null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $link_1= null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $link_2= null;
#[ORM\ManyToMany(targetEntity: \App\Entity\Post::class, mappedBy: 'organizations')]
private mixed $posts;
#[ORM\OneToMany(targetEntity: \App\Entity\Post::class, mappedBy: 'organisation1')]
private mixed $posts1;
#[ORM\OneToMany(targetEntity: \App\Entity\Post::class, mappedBy: 'organisation2')]
private mixed $posts2;
#[ORM\OneToMany(targetEntity: \App\Entity\Post::class, mappedBy: 'organisation3')]
private mixed $posts3;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $type= null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $latitude= null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $longitude= null;
#[ORM\Column(type: 'text', nullable: true)]
private ?string $multipoints= null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $rue= null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $code_postal= null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $ville= null;
#[ORM\OneToMany(targetEntity: \App\Entity\Pages::class, mappedBy: 'organisation1')]
private mixed $pages1;
#[ORM\OneToMany(targetEntity: \App\Entity\Pages::class, mappedBy: 'organisation2')]
private mixed $pages2;
#[ORM\OneToMany(targetEntity: \App\Entity\Pages::class, mappedBy: 'organisation3')]
private mixed $pages3;
#[ORM\ManyToOne(targetEntity: \App\Entity\TypeOrganisation::class, inversedBy: 'organizations')]
private mixed $type_organisation;
public function __construct()
{
$this->posts = new ArrayCollection();
$this->posts1 = new ArrayCollection();
$this->posts2 = new ArrayCollection();
$this->posts3 = new ArrayCollection();
$this->pages1 = new ArrayCollection();
$this->pages2 = new ArrayCollection();
$this->pages3 = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getTitle(): ?string
{
return $this->title;
}
public function setTitle(?string $title): self
{
$this->title = $title;
return $this;
}
public function getSubtitle(): ?string
{
return $this->subtitle;
}
public function setSubtitle(?string $subtitle): self
{
$this->subtitle = $subtitle;
return $this;
}
public function getPicture(): ?string
{
return $this->picture;
}
public function setPicture(?string $picture): self
{
$this->picture = $picture;
return $this;
}
public function getShortDescription(): ?string
{
return $this->short_description;
}
public function setShortDescription(?string $short_description): self
{
$this->short_description = $short_description;
return $this;
}
public function getLongDescription(): ?string
{
return $this->long_description;
}
public function setLongDescription(?string $long_description): self
{
$this->long_description = $long_description;
return $this;
}
public function getDisplayName(): ?string
{
return $this->display_name;
}
public function setDisplayName(?string $display_name): self
{
$this->display_name = $display_name;
return $this;
}
public function getTerritory(): ?Territory
{
return $this->territory;
}
public function setTerritory(?Territory $territory): self
{
$this->territory = $territory;
return $this;
}
public function getOpeningHours(): ?string
{
return $this->opening_hours;
}
public function setOpeningHours(?string $opening_hours): self
{
$this->opening_hours = $opening_hours;
return $this;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(?string $email): self
{
$this->email = $email;
return $this;
}
public function getPhone(): ?string
{
return $this->phone;
}
public function setPhone(?string $phone): self
{
$this->phone = $phone;
return $this;
}
public function getAcceo(): ?string
{
return $this->acceo;
}
public function setAcceo(?string $acceo): self
{
$this->acceo = $acceo;
return $this;
}
public function getLink1(): ?string
{
return $this->link_1;
}
public function setLink1(?string $link_1): self
{
$this->link_1 = $link_1;
return $this;
}
public function getLink2(): ?string
{
return $this->link_2;
}
public function setLink2(?string $link_2): self
{
$this->link_2 = $link_2;
return $this;
}
/**
* @return Collection|Post[]
*/
public function getPosts(): Collection
{
return $this->posts;
}
public function addPost(Post $post): self
{
if (!$this->posts->contains($post)) {
$this->posts[] = $post;
$post->addOrganization($this);
}
return $this;
}
public function removePost(Post $post): self
{
if ($this->posts->contains($post)) {
$this->posts->removeElement($post);
$post->removeOrganization($this);
}
return $this;
}
/**
* @return Collection|Post[]
*/
public function getPosts1(): Collection
{
return $this->posts1;
}
public function addPosts1(Post $posts1): self
{
if (!$this->posts1->contains($posts1)) {
$this->posts1[] = $posts1;
$posts1->setOrganisation1($this);
}
return $this;
}
public function removePosts1(Post $posts1): self
{
if ($this->posts1->contains($posts1)) {
$this->posts1->removeElement($posts1);
// set the owning side to null (unless already changed)
if ($posts1->getOrganisation1() === $this) {
$posts1->setOrganisation1(null);
}
}
return $this;
}
/**
* @return Collection|Post[]
*/
public function getPosts2(): Collection
{
return $this->posts2;
}
public function addPosts2(Post $posts2): self
{
if (!$this->posts2->contains($posts2)) {
$this->posts2[] = $posts2;
$posts2->setOrganisation2($this);
}
return $this;
}
public function removePosts2(Post $posts2): self
{
if ($this->posts2->contains($posts2)) {
$this->posts2->removeElement($posts2);
// set the owning side to null (unless already changed)
if ($posts2->getOrganisation2() === $this) {
$posts2->setOrganisation2(null);
}
}
return $this;
}
/**
* @return Collection|Post[]
*/
public function getPosts3(): Collection
{
return $this->posts3;
}
public function addPosts3(Post $posts3): self
{
if (!$this->posts3->contains($posts3)) {
$this->posts3[] = $posts3;
$posts3->setOrganisation3($this);
}
return $this;
}
public function removePosts3(Post $posts3): self
{
if ($this->posts3->contains($posts3)) {
$this->posts3->removeElement($posts3);
// set the owning side to null (unless already changed)
if ($posts3->getOrganisation3() === $this) {
$posts3->setOrganisation3(null);
}
}
return $this;
}
public function __toString(): string
{
return $this->title . ' ' . $this->ville;
}
public function getType(): ?string
{
return $this->type;
}
public function setType(?string $type): self
{
$this->type = $type;
return $this;
}
public function getLatitude(): ?string
{
return $this->latitude;
}
public function setLatitude(?string $latitude): self
{
$this->latitude = $latitude;
return $this;
}
public function getLongitude(): ?string
{
return $this->longitude;
}
public function setLongitude(?string $longitude): self
{
$this->longitude = $longitude;
return $this;
}
public function getMultipoints(): ?string
{
return $this->multipoints;
}
public function setMultipoints(?string $multipoints): self
{
$this->multipoints = $multipoints;
return $this;
}
public function getRue(): ?string
{
return $this->rue;
}
public function setRue(?string $rue): self
{
$this->rue = $rue;
return $this;
}
public function getCodePostal(): ?string
{
return $this->code_postal;
}
public function setCodePostal(?string $code_postal): self
{
$this->code_postal = $code_postal;
return $this;
}
public function getVille(): ?string
{
return $this->ville;
}
public function setVille(?string $ville): self
{
$this->ville = $ville;
return $this;
}
/**
* @return Collection|Pages[]
*/
public function getPages1(): Collection
{
return $this->pages1;
}
public function addPages1(Pages $pages1): self
{
if (!$this->pages1->contains($pages1)) {
$this->pages1[] = $pages1;
$pages1->setOrganisation1($this);
}
return $this;
}
public function removePages1(Pages $pages1): self
{
if ($this->pages1->contains($pages1)) {
$this->pages1->removeElement($pages1);
// set the owning side to null (unless already changed)
if ($pages1->getOrganisation1() === $this) {
$pages1->setOrganisation1(null);
}
}
return $this;
}
/**
* @return Collection|Pages[]
*/
public function getPages2(): Collection
{
return $this->pages2;
}
public function addPages2(Pages $pages2): self
{
if (!$this->pages2->contains($pages2)) {
$this->pages2[] = $pages2;
$pages2->setOrganisation2($this);
}
return $this;
}
public function removePages2(Pages $pages2): self
{
if ($this->pages2->contains($pages2)) {
$this->pages2->removeElement($pages2);
// set the owning side to null (unless already changed)
if ($pages2->getOrganisation2() === $this) {
$pages2->setOrganisation2(null);
}
}
return $this;
}
/**
* @return Collection|Pages[]
*/
public function getPages3(): Collection
{
return $this->pages3;
}
public function addPages3(Pages $pages3): self
{
if (!$this->pages3->contains($pages3)) {
$this->pages3[] = $pages3;
$pages3->setOrganisation3($this);
}
return $this;
}
public function removePages3(Pages $pages3): self
{
if ($this->pages3->contains($pages3)) {
$this->pages3->removeElement($pages3);
// set the owning side to null (unless already changed)
if ($pages3->getOrganisation3() === $this) {
$pages3->setOrganisation3(null);
}
}
return $this;
}
public function getTypeOrganisation(): ?TypeOrganisation
{
return $this->type_organisation;
}
public function setTypeOrganisation(?TypeOrganisation $type_organisation): self
{
$this->type_organisation = $type_organisation;
return $this;
}
}