<?php
namespace App\Entity;
use App\Repository\LayersRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: LayersRepository::class)]
class Layers
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $name;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $name_geo_server;
#[ORM\Column(type: 'boolean', nullable: true)]
private $static;
#[ORM\Column(type: 'float', nullable: true)]
private $zoom_min;
#[ORM\Column(type: 'float', nullable: true)]
private $zoom_max;
#[ORM\Column(type: 'integer', nullable: true)]
private $position;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $slug;
#[ORM\Column(type: 'boolean', nullable: true)]
private $token;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $authKey;
#[ORM\Column(type: 'float', nullable: true)]
private $opacity;
#[ORM\Column(type: 'integer', nullable: true)]
private $grouped;
#[ORM\Column(type: 'boolean', nullable: true)]
private $visibility;
#[ORM\OneToMany(mappedBy: 'fk_layers', targetEntity: ConfigGeoLayers::class)]
private $configGeoLayers;
public function __construct()
{
$this->configGeoLayers = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(?string $name): self
{
$this->name = $name;
return $this;
}
public function getNameGeoServer(): ?string
{
return $this->name_geo_server;
}
public function setNameGeoServer(?string $name_geo_server): self
{
$this->name_geo_server = $name_geo_server;
return $this;
}
public function isStatic(): ?bool
{
return $this->static;
}
public function setStatic(?bool $static): self
{
$this->static = $static;
return $this;
}
public function getZoomMin(): ?float
{
return $this->zoom_min;
}
public function setZoomMin(?float $zoom_min): self
{
$this->zoom_min = $zoom_min;
return $this;
}
public function getZoomMax(): ?float
{
return $this->zoom_max;
}
public function setZoomMax(?float $zoom_max): self
{
$this->zoom_max = $zoom_max;
return $this;
}
public function getPosition(): ?int
{
return $this->position;
}
public function setPosition(?int $position): self
{
$this->position = $position;
return $this;
}
public function getSlug(): ?string
{
return $this->slug;
}
public function setSlug(?string $slug): self
{
$this->slug = $slug;
return $this;
}
public function isToken(): ?bool
{
return $this->token;
}
public function setToken(?bool $token): self
{
$this->token = $token;
return $this;
}
public function getAuthKey(): ?string
{
return $this->authKey;
}
public function setAuthKey(?string $authKey): self
{
$this->authKey = $authKey;
return $this;
}
public function getOpacity(): ?float
{
return $this->opacity;
}
public function setOpacity(?float $opacity): self
{
$this->opacity = $opacity;
return $this;
}
public function getGrouped(): ?int
{
return $this->grouped;
}
public function setGrouped(?int $grouped): self
{
$this->grouped = $grouped;
return $this;
}
public function isVisibility(): ?bool
{
return $this->visibility;
}
public function setVisibility(?bool $visibility): self
{
$this->visibility = $visibility;
return $this;
}
/**
* @return Collection<int, ConfigGeoLayers>
*/
public function getConfigGeoLayers(): Collection
{
return $this->configGeoLayers;
}
public function addConfigGeoLayer(ConfigGeoLayers $configGeoLayer): self
{
if (!$this->configGeoLayers->contains($configGeoLayer)) {
$this->configGeoLayers[] = $configGeoLayer;
$configGeoLayer->setFkLayers($this);
}
return $this;
}
public function removeConfigGeoLayer(ConfigGeoLayers $configGeoLayer): self
{
if ($this->configGeoLayers->removeElement($configGeoLayer)) {
// set the owning side to null (unless already changed)
if ($configGeoLayer->getFkLayers() === $this) {
$configGeoLayer->setFkLayers(null);
}
}
return $this;
}
}