<?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\BridgeParameterGroupRepository")
*/
class BridgeParameterGroup
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $name;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $ordering;
/**
* @ORM\OneToMany(targetEntity="App\Entity\BridgeParameter", mappedBy="parameterGroup", cascade={"persist"}, orphanRemoval=true)
* @ORM\OrderBy({"ordering"="ASC"})
*/
private $parameters;
/**
* @ORM\Column(type="string", length=255, unique=true)
*/
private $key;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $showInParams = true;
/**
* @ORM\Column(type="boolean", nullable=true, options={"default":false})
*/
private ?bool $usableByEntitiesAdmins = false;
public function __construct()
{
$this->parameters = 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 getOrdering() : ?int
{
return $this->ordering;
}
public function setOrdering(?int $ordering) : self
{
$this->ordering = $ordering;
return $this;
}
public function getUsableByEntitiesAdmins(): ?bool
{
return $this->usableByEntitiesAdmins;
}
public function setUsableByEntitiesAdmins(?bool $usableByEntitiesAdmins): self
{
$this->usableByEntitiesAdmins = $usableByEntitiesAdmins;
return $this;
}
/**
* @return Collection|BridgeParameter[]
*/
public function getParameters() : Collection
{
return $this->parameters;
}
public function addParameter(BridgeParameter $parameter) : self
{
if (!$this->parameters->contains($parameter)) {
$this->parameters[] = $parameter;
$parameter->setParameterGroup($this);
}
return $this;
}
public function removeParameter(BridgeParameter $parameter) : self
{
if ($this->parameters->contains($parameter)) {
$this->parameters->removeElement($parameter);
// set the owning side to null (unless already changed)
if ($parameter->getParameterGroup() === $this) {
$parameter->setParameterGroup(null);
}
}
return $this;
}
public function getKey() : ?string
{
return $this->key;
}
public function setKey(?string $key) : self
{
$this->key = $key;
return $this;
}
public function getShowInParams() : ?bool
{
return $this->showInParams;
}
public function setShowInParams(?bool $showInParams) : self
{
$this->showInParams = $showInParams;
return $this;
}
}