<?php
namespace App\Entity;
use App\Repository\WebPageParameterRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=WebPageParameterRepository::class)
*/
class WebPageParameter
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=WebPage::class, inversedBy="parameters")
* @ORM\JoinColumn(nullable=false)
*/
private $webPage;
/**
* @ORM\ManyToOne(targetEntity=BridgeParameter::class, inversedBy="webPageParameters", cascade={"persist"})
* @ORM\JoinColumn(nullable=false)
*/
private $bridgeParameter;
/**
* @ORM\Column(type="json", nullable=true)
*/
private $value = [];
public function getId(): ?int
{
return $this->id;
}
public function getValue(): ?array
{
return $this->value;
}
public function setValue(?array $value): self
{
$this->value = $value;
return $this;
}
public function getWebPage(): ?WebPage
{
return $this->webPage;
}
public function setWebPage(?WebPage $webPage): self
{
$this->webPage = $webPage;
return $this;
}
public function getBridgeParameter(): ?BridgeParameter
{
return $this->bridgeParameter;
}
public function setBridgeParameter(?BridgeParameter $bridgeParameter): self
{
$this->bridgeParameter = $bridgeParameter;
return $this;
}
public function getParameterKey(): string
{
return $this->getBridgeParameter()->getKey();
}
}