src/Entity/Apps.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\AppsRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. #[ORM\Entity(repositoryClassAppsRepository::class)]
  9. class Apps
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column(length255)]
  16.     private ?string $title null;
  17.     #[ORM\OneToMany(mappedBy'app'targetEntityTokens::class,cascade:  ['persist''remove'])]
  18.     private Collection $tokens;
  19.     #[ORM\ManyToMany(targetEntityPlaces::class, mappedBy'app',cascade:  ['persist''remove'])]
  20.     private Collection $places;
  21.     #[ORM\ManyToMany(targetEntityCategories::class, mappedBy'app',cascade:  ['persist''remove'])]
  22.     private Collection $categories;
  23.     #[ORM\OneToOne(mappedBy'App'cascade: ['persist''remove'])]
  24.     private ?User $user null;
  25.     #[ORM\Column(typeTypes::DECIMALprecision10scale8nullabletrue)]
  26.     private ?string $centerLat null;
  27.     #[ORM\Column(typeTypes::DECIMALprecision11scale8nullabletrue)]
  28.     private ?string $centerLon null;
  29.     #[ORM\Column(nullabletrue)]
  30.     private ?int $zoom null;
  31.     #[ORM\Column(nullabletrue)]
  32.                                private ?int $minzoom null;
  33.     #[ORM\Column(nullabletrue)]
  34.                                private ?int $maxzoom null;
  35.     #[ORM\Column(nullabletrue)]
  36.                                private ?int $mapwidth null;
  37.     #[ORM\Column(nullabletrue)]
  38.                                private ?int $mapheight null;
  39.     #[ORM\Column(nullablefalseoptions:['default'=>'10,20,50,100,200'] )]
  40.                                private ?string $distanceSteps '';
  41.     #[ORM\Column]
  42.                                private array $listMode = [];
  43.     #[ORM\Column]
  44.                                private bool $orderSwitch false;
  45.     #[ORM\Column(nullabletrueoptions:['default'=>'#006600'] )]
  46.                                private ?string $clusterColor '';
  47.     #[ORM\Column(nullabletrueoptions:['default'=>'#ffffff'] )]
  48.                                private ?string $clusterTextColor '';
  49.     #[ORM\Column(length100nullabletrue)]
  50.     private ?string $legendTitle null;
  51.     #[ORM\Column]
  52.     private ?bool $showCatFilter null;
  53.     #[ORM\Column]
  54.     private ?bool $shownZipSearch null;
  55.     public function __construct()
  56.     {
  57.         $this->tokens = new ArrayCollection();
  58.         $this->places = new ArrayCollection();
  59.         $this->categories = new ArrayCollection();
  60.     }
  61.     public function getId(): ?int
  62.     {
  63.         return $this->id;
  64.     }
  65.     public function getTitle(): ?string
  66.     {
  67.         return $this->title;
  68.     }
  69.     public function setTitle(string $title): self
  70.     {
  71.         $this->title $title;
  72.         return $this;
  73.     }
  74.     /**
  75.      * @return Collection<int, Tokens>
  76.      */
  77.     public function getTokens(): Collection
  78.     {
  79.         return $this->tokens;
  80.     }
  81.     public function addToken(Tokens $token): self
  82.     {
  83.         if (!$this->tokens->contains($token)) {
  84.             $this->tokens->add($token);
  85.             $token->setApp($this);
  86.         }
  87.         return $this;
  88.     }
  89.     public function removeToken(Tokens $token): self
  90.     {
  91.         if ($this->tokens->removeElement($token)) {
  92.             // set the owning side to null (unless already changed)
  93.             if ($token->getApp() === $this) {
  94.                 $token->setApp(null);
  95.             }
  96.         }
  97.         return $this;
  98.     }
  99.     /**
  100.      * @return Collection<int, Places>
  101.      */
  102.     public function getPlaces(): Collection
  103.     {
  104.         return $this->places;
  105.     }
  106.     public function addPlace(Places $place): self
  107.     {
  108.         if (!$this->places->contains($place)) {
  109.             $this->places->add($place);
  110.             $place->addApp($this);
  111.         }
  112.         return $this;
  113.     }
  114.     public function removePlace(Places $place): self
  115.     {
  116.         if ($this->places->removeElement($place)) {
  117.             $place->removeApp($this);
  118.         }
  119.         return $this;
  120.     }
  121.     /**
  122.      * @return Collection<int, Categories>
  123.      */
  124.     public function getCategories(): Collection
  125.     {
  126.         return $this->categories;
  127.     }
  128.     public function addCategory(Categories $category): self
  129.     {
  130.         if (!$this->categories->contains($category)) {
  131.             $this->categories->add($category);
  132.             $category->addApp($this);
  133.         }
  134.         return $this;
  135.     }
  136.     public function removeCategory(Categories $category): self
  137.     {
  138.         if ($this->categories->removeElement($category)) {
  139.             $category->removeApp($this);
  140.         }
  141.         return $this;
  142.     }
  143.     public function getUser(): ?User
  144.     {
  145.         return $this->user;
  146.     }
  147.     public function setUser(?User $user): self
  148.     {
  149.         // unset the owning side of the relation if necessary
  150.         if ($user === null && $this->user !== null) {
  151.             $this->user->setApp(null);
  152.         }
  153.         // set the owning side of the relation if necessary
  154.         if ($user !== null && $user->getApp() !== $this) {
  155.             $user->setApp($this);
  156.         }
  157.         $this->user $user;
  158.         return $this;
  159.     }
  160.     public function getCenterLat(): ?string
  161.     {
  162.         return $this->centerLat;
  163.     }
  164.     public function setCenterLat(?string $centerLat): self
  165.     {
  166.         $this->centerLat $centerLat;
  167.         return $this;
  168.     }
  169.     public function getCenterLon(): ?string
  170.     {
  171.         return $this->centerLon;
  172.     }
  173.     public function setCenterLon(?string $centerLon): self
  174.     {
  175.         $this->centerLon $centerLon;
  176.         return $this;
  177.     }
  178.     public function getZoom(): ?int
  179.     {
  180.         return $this->zoom;
  181.     }
  182.     public function setZoom(?int $zoom): self
  183.     {
  184.         $this->zoom $zoom;
  185.         return $this;
  186.     }
  187.     /**
  188.      * @return int|null
  189.      */
  190.     public function getMinzoom (): ?int {
  191.                                    return $this->minzoom;
  192.                                }
  193.     /**
  194.      * @param int|null $minzoom
  195.      */
  196.     public function setMinzoom (?int $minzoom): void {
  197.                                    $this->minzoom $minzoom;
  198.                                }
  199.     /**
  200.      * @return int|null
  201.      */
  202.     public function getMaxzoom (): ?int {
  203.                                    return $this->maxzoom;
  204.                                }
  205.     /**
  206.      * @param int|null $maxzoom
  207.      */
  208.     public function setMaxzoom (?int $maxzoom): void {
  209.                                    $this->maxzoom $maxzoom;
  210.                                }
  211.     /**
  212.      * @return int|null
  213.      */
  214.     public function getMapwidth (): ?int {
  215.                                    return $this->mapwidth;
  216.                                }
  217.     /**
  218.      * @param int|null $mapwidth
  219.      */
  220.     public function setMapwidth (?int $mapwidth): void {
  221.                                    $this->mapwidth $mapwidth;
  222.                                }
  223.     /**
  224.      * @return int|null
  225.      */
  226.     public function getMapheight (): ?int {
  227.                                    return $this->mapheight;
  228.                                }
  229.     /**
  230.      * @param int|null $mapheight
  231.      */
  232.     public function setMapheight (?int $mapheight): void {
  233.                                    $this->mapheight $mapheight;
  234.                                }
  235.     /**
  236.      * @return string|null
  237.      */
  238.     public function getDistanceSteps (): ?string {
  239.                                    return $this->distanceSteps;
  240.                                }
  241.     /**
  242.      * @param string|null $distanceSteps
  243.      */
  244.     public function setDistanceSteps (?string $distanceSteps): void {
  245.                                    $this->distanceSteps $distanceSteps;
  246.                                }
  247.     /**
  248.      * @return array
  249.      */
  250.     public function getListMode (): array {
  251.                                    return $this->listMode;
  252.                                }
  253.     /**
  254.      * @param array $listMode
  255.      */
  256.     public function setListMode (array $listMode): void {
  257.                                    $this->listMode $listMode;
  258.                                }
  259.     /**
  260.      * @return bool
  261.      */
  262.     public function isOrderSwitch (): bool {
  263.                                    return $this->orderSwitch;
  264.                                }
  265.     /**
  266.      * @param bool $orderSwitch
  267.      */
  268.     public function setOrderSwitch (bool $orderSwitch): void {
  269.                                    $this->orderSwitch $orderSwitch;
  270.                                }
  271.     /**
  272.      * @return string|null
  273.      */
  274.     public function getClusterColor (): ?string {
  275.                                    return $this->clusterColor;
  276.                                }
  277.     /**
  278.      * @param string|null $clusterColor
  279.      */
  280.     public function setClusterColor (?string $clusterColor): void {
  281.                                    $this->clusterColor $clusterColor;
  282.                                }
  283.     /**
  284.      * @return string|null
  285.      */
  286.     public function getClusterTextColor (): ?string {
  287.                                    return $this->clusterTextColor;
  288.                                }
  289.     /**
  290.      * @param string|null $clusterTextColor
  291.      */
  292.     public function setClusterTextColor (?string $clusterTextColor): void {
  293.                                    $this->clusterTextColor $clusterTextColor;
  294.                                }
  295.     public function getLegendTitle(): ?string
  296.     {
  297.         return $this->legendTitle;
  298.     }
  299.     public function setLegendTitle(?string $legendTitle): static
  300.     {
  301.         $this->legendTitle $legendTitle;
  302.         return $this;
  303.     }
  304.     public function isShowCatFilter(): ?bool
  305.     {
  306.         return $this->showCatFilter;
  307.     }
  308.     public function setShowCatFilter(bool $showCatFilter): static
  309.     {
  310.         $this->showCatFilter $showCatFilter;
  311.         return $this;
  312.     }
  313.     public function isShownZipSearch(): ?bool
  314.     {
  315.         return $this->shownZipSearch;
  316.     }
  317.     public function setShownZipSearch(bool $shownZipSearch): static
  318.     {
  319.         $this->shownZipSearch $shownZipSearch;
  320.         return $this;
  321.     }
  322. }