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.     /**
  43.      * @ORM\Column(type="json", nullable=true)
  44.     */
  45.     private $usableByRoles;
  46.     public function __construct()
  47.     {
  48.         $this->parameters = new ArrayCollection();
  49.     }
  50.     public function getId() : ?int
  51.     {
  52.         return $this->id;
  53.     }
  54.     public function getName() : ?string
  55.     {
  56.         return $this->name;
  57.     }
  58.     public function setName(?string $name) : self
  59.     {
  60.         $this->name $name;
  61.         return $this;
  62.     }
  63.     public function getOrdering() : ?int
  64.     {
  65.         return $this->ordering;
  66.     }
  67.     public function setOrdering(?int $ordering) : self
  68.     {
  69.         $this->ordering $ordering;
  70.         return $this;
  71.     }
  72.     public function getUsableByEntitiesAdmins(): ?bool
  73.     {
  74.         return $this->usableByEntitiesAdmins;
  75.     }
  76.     public function setUsableByEntitiesAdmins(?bool $usableByEntitiesAdmins): self
  77.     {
  78.         $this->usableByEntitiesAdmins $usableByEntitiesAdmins;
  79.         return $this;
  80.     }
  81.     /**
  82.      * @return Collection|BridgeParameter[]
  83.      */
  84.     public function getParameters() : Collection
  85.     {
  86.         return $this->parameters;
  87.     }
  88.     public function addParameter(BridgeParameter $parameter) : self
  89.     {
  90.         if (!$this->parameters->contains($parameter)) {
  91.             $this->parameters[] = $parameter;
  92.             $parameter->setParameterGroup($this);
  93.         }
  94.         return $this;
  95.     }
  96.     public function removeParameter(BridgeParameter $parameter) : self
  97.     {
  98.         if ($this->parameters->contains($parameter)) {
  99.             $this->parameters->removeElement($parameter);
  100.             // set the owning side to null (unless already changed)
  101.             if ($parameter->getParameterGroup() === $this) {
  102.                 $parameter->setParameterGroup(null);
  103.             }
  104.         }
  105.         return $this;
  106.     }
  107.     public function getKey() : ?string
  108.     {
  109.         return $this->key;
  110.     }
  111.     public function setKey(?string $key) : self
  112.     {
  113.         $this->key $key;
  114.         return $this;
  115.     }
  116.     public function getShowInParams() : ?bool
  117.     {
  118.         return $this->showInParams;
  119.     }
  120.     public function setShowInParams(?bool $showInParams) : self
  121.     {
  122.         $this->showInParams $showInParams;
  123.         return $this;
  124.     }
  125.     public function getUsableByRoles()
  126.     {
  127.         return $this->usableByRoles;
  128.     }
  129.     public function setUsableByRoles($usableByRoles): self
  130.     {
  131.         $this->usableByRoles $usableByRoles;
  132.         return $this;
  133.     }
  134. }