src/Entity/FieldParams.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\FieldParamsRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  6. /**
  7.  * @ORM\Entity(repositoryClass=FieldParamsRepository::class)
  8.  * @UniqueEntity(fields={"field","paramKey"}, groups={"Unique_fields"})
  9.  */
  10. class FieldParams
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\ManyToOne(targetEntity=Field::class, inversedBy="fieldParams")
  20.      */
  21.     private $field;
  22.     /**
  23.      * @ORM\Column(type="string", length=255)
  24.      */
  25.     private $paramKey;
  26.     /**
  27.      * @ORM\Column(type="string", length=255, nullable=true)
  28.      */
  29.     private $value;
  30.     public function getId(): ?int
  31.     {
  32.         return $this->id;
  33.     }
  34.     public function getField(): ?Field
  35.     {
  36.         return $this->field;
  37.     }
  38.     public function setField(?Field $field): self
  39.     {
  40.         $this->field $field;
  41.         return $this;
  42.     }
  43.     /**
  44.      * @return mixed
  45.      */
  46.     public function getParamKey()
  47.     {
  48.         return $this->paramKey;
  49.     }
  50.     /**
  51.      * @param mixed $paramKey
  52.      */
  53.     public function setParamKey($paramKey): void
  54.     {
  55.         $this->paramKey $paramKey;
  56.     }
  57.     public function getValue(): ?string
  58.     {
  59.         return $this->value;
  60.     }
  61.     public function setValue(?string $value): self
  62.     {
  63.         $this->value $value;
  64.         return $this;
  65.     }
  66. }