src/Entity/BridgeParameterGroup.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * @ORM\Entity (repositoryClass="App\Repository\BridgeParameterGroupRepository")
  8.  */
  9. class BridgeParameterGroup
  10. {
  11.     /**
  12.      * @ORM\Id()
  13.      * @ORM\GeneratedValue()
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\Column(type="string", length=255, nullable=true)
  19.      */
  20.     private $name;
  21.     /**
  22.      * @ORM\Column(type="integer", nullable=true)
  23.      */
  24.     private $ordering;
  25.     /**
  26.      * @ORM\OneToMany(targetEntity="App\Entity\BridgeParameter", mappedBy="parameterGroup", cascade={"persist"}, orphanRemoval=true)
  27.      * @ORM\OrderBy({"ordering"="ASC"})
  28.      */
  29.     private $parameters;
  30.     /**
  31.      * @ORM\Column(type="string", length=255, unique=true)
  32.      */
  33.     private $key;
  34.     /**
  35.      * @ORM\Column(type="boolean", nullable=true)
  36.      */
  37.     private $showInParams true;
  38.     /**
  39.      * @ORM\Column(type="boolean", nullable=true, options={"default":false})
  40.      */
  41.     private ?bool $usableByEntitiesAdmins false;
  42.     public function __construct()
  43.     {
  44.         $this->parameters = new ArrayCollection();
  45.     }
  46.     public function getId() : ?int
  47.     {
  48.         return $this->id;
  49.     }
  50.     public function getName() : ?string
  51.     {
  52.         return $this->name;
  53.     }
  54.     public function setName(?string $name) : self
  55.     {
  56.         $this->name $name;
  57.         return $this;
  58.     }
  59.     public function getOrdering() : ?int
  60.     {
  61.         return $this->ordering;
  62.     }
  63.     public function setOrdering(?int $ordering) : self
  64.     {
  65.         $this->ordering $ordering;
  66.         return $this;
  67.     }
  68.     public function getUsableByEntitiesAdmins(): ?bool
  69.     {
  70.         return $this->usableByEntitiesAdmins;
  71.     }
  72.     public function setUsableByEntitiesAdmins(?bool $usableByEntitiesAdmins): self
  73.     {
  74.         $this->usableByEntitiesAdmins $usableByEntitiesAdmins;
  75.         return $this;
  76.     }
  77.     /**
  78.      * @return Collection|BridgeParameter[]
  79.      */
  80.     public function getParameters() : Collection
  81.     {
  82.         return $this->parameters;
  83.     }
  84.     public function addParameter(BridgeParameter $parameter) : self
  85.     {
  86.         if (!$this->parameters->contains($parameter)) {
  87.             $this->parameters[] = $parameter;
  88.             $parameter->setParameterGroup($this);
  89.         }
  90.         return $this;
  91.     }
  92.     public function removeParameter(BridgeParameter $parameter) : self
  93.     {
  94.         if ($this->parameters->contains($parameter)) {
  95.             $this->parameters->removeElement($parameter);
  96.             // set the owning side to null (unless already changed)
  97.             if ($parameter->getParameterGroup() === $this) {
  98.                 $parameter->setParameterGroup(null);
  99.             }
  100.         }
  101.         return $this;
  102.     }
  103.     public function getKey() : ?string
  104.     {
  105.         return $this->key;
  106.     }
  107.     public function setKey(?string $key) : self
  108.     {
  109.         $this->key $key;
  110.         return $this;
  111.     }
  112.     public function getShowInParams() : ?bool
  113.     {
  114.         return $this->showInParams;
  115.     }
  116.     public function setShowInParams(?bool $showInParams) : self
  117.     {
  118.         $this->showInParams $showInParams;
  119.         return $this;
  120.     }
  121. }