<?php
namespace App\Entity;
use App\Repository\ConfigGeoServerRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: ConfigGeoServerRepository::class)]
class ConfigGeoServer
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\Column(type: 'string', length: 255)]
private $name;
#[ORM\Column(type: 'string', length: 255)]
private $cluster;
#[ORM\Column(type: 'string', length: 255)]
private $slug;
#[ORM\Column(type: 'boolean', nullable: true)]
private $filter;
#[ORM\Column(type: 'string', length: 16, nullable: true)]
private $type_filter;
#[ORM\ManyToOne(targetEntity: FilterRange::class, inversedBy: 'configGeoServers')]
private $fk_filterRange;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $style;
#[ORM\OneToMany(mappedBy: 'fk_ConfigGeoServer', targetEntity: Styles::class)]
private $styles;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $default_value;
#[ORM\Column(type: 'boolean', nullable: true)]
private $multiple;
#[ORM\OneToMany(mappedBy: 'fk_ConfigGeoServer', targetEntity: FilterOptions::class)]
private $filterOptions;
#[ORM\Column(type: 'integer', nullable: true)]
private $position;
#[ORM\OneToMany(mappedBy: 'fk_config', targetEntity: ConfigGeoLayers::class)]
private $configGeoLayers;
public function __construct()
{
$this->styles = new ArrayCollection();
$this->filterOptions = new ArrayCollection();
$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 getCluster(): ?string
{
return $this->cluster;
}
public function setCluster(string $cluster): self
{
$this->cluster = $cluster;
return $this;
}
public function getSlug(): ?string
{
return $this->slug;
}
public function setSlug(string $slug): self
{
$this->slug = $slug;
return $this;
}
public function isFilter(): ?bool
{
return $this->filter;
}
public function setFilter(?bool $filter): self
{
$this->filter = $filter;
return $this;
}
public function getTypeFilter(): ?string
{
return $this->type_filter;
}
public function setTypeFilter(?string $type_filter): self
{
$this->type_filter = $type_filter;
return $this;
}
public function getFkFilterRange(): ?FilterRange
{
return $this->fk_filterRange;
}
public function setFkFilterRange(?FilterRange $fk_filterRange): self
{
$this->fk_filterRange = $fk_filterRange;
return $this;
}
public function getStyle(): ?string
{
return $this->style;
}
public function setStyle(?string $style): self
{
$this->style = $style;
return $this;
}
/**
* @return Collection<int, Styles>
*/
public function getStyles(): Collection
{
return $this->styles;
}
public function addStyle(Styles $style): self
{
if (!$this->styles->contains($style)) {
$this->styles[] = $style;
$style->setFkConfigGeoServer($this);
}
return $this;
}
public function removeStyle(Styles $style): self
{
if ($this->styles->removeElement($style)) {
// set the owning side to null (unless already changed)
if ($style->getFkConfigGeoServer() === $this) {
$style->setFkConfigGeoServer(null);
}
}
return $this;
}
public function getDefaultValue(): ?string
{
return $this->default_value;
}
public function setDefaultValue(?string $default_value): self
{
$this->default_value = $default_value;
return $this;
}
public function isMultiple(): ?bool
{
return $this->multiple;
}
public function setMultiple(?bool $multiple): self
{
$this->multiple = $multiple;
return $this;
}
/**
* @return Collection<int, FilterOptions>
*/
public function getFilterOptions(): Collection
{
return $this->filterOptions;
}
public function addFilterOption(FilterOptions $filterOption): self
{
if (!$this->filterOptions->contains($filterOption)) {
$this->filterOptions[] = $filterOption;
$filterOption->setFkConfigGeoServer($this);
}
return $this;
}
public function removeFilterOption(FilterOptions $filterOption): self
{
if ($this->filterOptions->removeElement($filterOption)) {
// set the owning side to null (unless already changed)
if ($filterOption->getFkConfigGeoServer() === $this) {
$filterOption->setFkConfigGeoServer(null);
}
}
return $this;
}
public function getPosition(): ?int
{
return $this->position;
}
public function setPosition(?int $position): self
{
$this->position = $position;
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->setFkConfig($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->getFkConfig() === $this) {
$configGeoLayer->setFkConfig(null);
}
}
return $this;
}
}