src/Entity/WebPageParameter.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\WebPageParameterRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=WebPageParameterRepository::class)
  7.  */
  8. class WebPageParameter
  9. {
  10.     /**
  11.      * @ORM\Id
  12.      * @ORM\GeneratedValue
  13.      * @ORM\Column(type="integer")
  14.      */
  15.     private $id;
  16.     /**
  17.      * @ORM\ManyToOne(targetEntity=WebPage::class, inversedBy="parameters")
  18.      * @ORM\JoinColumn(nullable=false)
  19.      */
  20.     private $webPage;
  21.     /**
  22.      * @ORM\ManyToOne(targetEntity=BridgeParameter::class, inversedBy="webPageParameters", cascade={"persist"})
  23.      * @ORM\JoinColumn(nullable=false)
  24.      */
  25.     private $bridgeParameter;
  26.     /**
  27.      * @ORM\Column(type="json", nullable=true)
  28.      */
  29.     private $value = [];
  30.     public function getId(): ?int
  31.     {
  32.         return $this->id;
  33.     }
  34.     public function getValue(): ?array
  35.     {
  36.         return $this->value;
  37.     }
  38.     public function setValue(?array $value): self
  39.     {
  40.         $this->value $value;
  41.         return $this;
  42.     }
  43.     public function getWebPage(): ?WebPage
  44.     {
  45.         return $this->webPage;
  46.     }
  47.     public function setWebPage(?WebPage $webPage): self
  48.     {
  49.         $this->webPage $webPage;
  50.         return $this;
  51.     }
  52.     public function getBridgeParameter(): ?BridgeParameter
  53.     {
  54.         return $this->bridgeParameter;
  55.     }
  56.     public function setBridgeParameter(?BridgeParameter $bridgeParameter): self
  57.     {
  58.         $this->bridgeParameter $bridgeParameter;
  59.         return $this;
  60.     }
  61.     public function getParameterKey(): string
  62.     {
  63.         return $this->getBridgeParameter()->getKey();
  64.     }
  65. }