src/Entity/Business.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\BusinessRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassBusinessRepository::class)]
  8. class Business extends \App\Entity\Node
  9. {
  10.     #[ORM\Column(type"text"nullabletrue)]
  11.     private $about;
  12.     #[ORM\Column]
  13.     private ?bool $isCinema null;
  14.     #[ORM\OneToMany(mappedBy'node'targetEntityMovie::class)]
  15.     #[ORM\OrderBy(['timeFrom','ASC'])]
  16.     private Collection $movies;
  17.     #[ORM\Column]
  18.     private ?bool $isCenter null;
  19.     #[ORM\Column(length255nullabletrue)]
  20.     private ?string $cinemaFeed null;
  21.     #[ORM\OneToOne(cascade: ['persist''remove'])]
  22.     private ?Contact $address null;
  23.     #[ORM\Column(nullabletrue)]
  24.     private ?bool $isVacationClosed null;
  25.     #[ORM\ManyToOne(inversedBy'businesses')]
  26.     private ?Category $category null;
  27.     #[ORM\OneToOne(cascade: ['persist''remove'])]
  28.     private ?Image $logo null;
  29.     #[ORM\Column(length10nullabletrue)]
  30.     private ?string $position null;
  31.     #[ORM\Column(length255nullabletrue)]
  32.     private ?string $map null;
  33.     #[ORM\Column]
  34.     private ?int $floor null;
  35.     public function __construct()
  36.     {
  37.         parent::__construct();
  38.     }
  39.     public function isIsCinema(): ?bool
  40.     {
  41.         return $this->isCinema;
  42.     }
  43.     public function setIsCinema(bool $isCinema): static
  44.     {
  45.         $this->isCinema $isCinema;
  46.         return $this;
  47.     }
  48.     /**
  49.      * @return Collection<int, Movie>
  50.      */
  51.     public function getMovies(): Collection
  52.     {
  53.         return $this->movies;
  54.     }
  55.     public function addMovie(Movie $movie): static
  56.     {
  57.         if (!$this->movies->contains($movie)) {
  58.             $this->movies->add($movie);
  59.             $movie->setNode($this);
  60.         }
  61.         return $this;
  62.     }
  63.     public function removeMovie(Movie $movie): static
  64.     {
  65.         if ($this->movies->removeElement($movie)) {
  66.             // set the owning side to null (unless already changed)
  67.             if ($movie->getNode() === $this) {
  68.                 $movie->setNode(null);
  69.             }
  70.         }
  71.         return $this;
  72.     }
  73.     public function isIsCenter(): ?bool
  74.     {
  75.         return $this->isCenter;
  76.     }
  77.     public function setIsCenter(bool $isCenter): static
  78.     {
  79.         $this->isCenter $isCenter;
  80.         return $this;
  81.     }
  82.     /**
  83.      * @return mixed
  84.      */
  85.     public function getAbout()
  86.     {
  87.         return $this->about;
  88.     }
  89.     /**
  90.      * @param mixed $about
  91.      */
  92.     public function setAbout($about): void
  93.     {
  94.         $this->about $about;
  95.     }
  96.     public function getCinemaFeed(): ?string
  97.     {
  98.         return $this->cinemaFeed;
  99.     }
  100.     public function setCinemaFeed(?string $cinemaFeed): static
  101.     {
  102.         $this->cinemaFeed $cinemaFeed;
  103.         return $this;
  104.     }
  105.     public function getAddress(): ?Contact
  106.     {
  107.         return $this->address;
  108.     }
  109.     public function setAddress(?Contact $address): static
  110.     {
  111.         $this->address $address;
  112.         return $this;
  113.     }
  114.     public function isIsVacationClosed(): ?bool
  115.     {
  116.         return $this->isVacationClosed;
  117.     }
  118.     public function setIsVacationClosed(?bool $isVacationClosed): static
  119.     {
  120.         $this->isVacationClosed $isVacationClosed;
  121.         return $this;
  122.     }
  123.     public function getCategory(): ?Category
  124.     {
  125.         return $this->category;
  126.     }
  127.     public function setCategory(?Category $category): void
  128.     {
  129.         $this->category $category;
  130.     }
  131.     public function getLogo(): ?Image
  132.     {
  133.         return $this->logo;
  134.     }
  135.     public function setLogo(?Image $logo): static
  136.     {
  137.         $this->logo $logo;
  138.         return $this;
  139.     }
  140.     public function getPosition(): ?string
  141.     {
  142.         return $this->position;
  143.     }
  144.     public function setPosition(?string $position): static
  145.     {
  146.         $this->position $position;
  147.         return $this;
  148.     }
  149.     public function getMap(): ?string
  150.     {
  151.         return $this->map;
  152.     }
  153.     public function setMap(?string $map): static
  154.     {
  155.         $this->map $map;
  156.         return $this;
  157.     }
  158.     public function getBusinessFormName(): string
  159.     {
  160.         return $this->title.' '.$this->parent->getTitle();
  161.     }
  162.     public function getFloor(): ?int
  163.     {
  164.         return $this->floor;
  165.     }
  166.     public function setFloor(int $floor): static
  167.     {
  168.         $this->floor $floor;
  169.         return $this;
  170.     }
  171. }