vendor/score/cms/src/Entity/Form/WebformValue.php line 13

Open in your IDE?
  1. <?php
  2. namespace Score\CmsBundle\Entity\Form;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Score\BaseBundle\Entity\BaseEntity;
  5. /**
  6.  * @ORM\Table(name="cms_form_value")
  7.  * @ORM\HasLifecycleCallbacks()
  8.  * @ORM\Entity()
  9.  */
  10. class WebformValue extends BaseEntity
  11. {
  12.     /**
  13.      * Many Fields have one form. This is the owning side.
  14.      * @ORM\ManyToOne(targetEntity="Webform", inversedBy="values")
  15.      * @ORM\JoinColumn(name="form_id", referencedColumnName="id")
  16.      */
  17.     private $form;
  18.     /**
  19.      * @ORM\Column(type="integer", name="user_id", nullable=true)
  20.      */
  21.     private $userId;
  22.     /**
  23.      * @ORM\Column(type="string", name="field_identifier", length=255)
  24.      */
  25.     private $fieldIdentifier;
  26.     /**
  27.      * @ORM\Column(type="string", name="identifier", length=255)
  28.      */
  29.     private $identifier;
  30.     /**
  31.      * @ORM\Column(type="string", name="value", length=5000)
  32.      */
  33.     private $value;
  34.     /**
  35.      * @ORM\Column(type="boolean", name="is_valid")
  36.      */
  37.     private $valid;
  38.     public function getForm(): ?Webform
  39.     {
  40.         return $this->form;
  41.     }
  42.     public function setForm(?Webform $form): self
  43.     {
  44.         $this->form $form;
  45.         return $this;
  46.     }
  47.     public function getUserId(): ?int
  48.     {
  49.         return $this->userId;
  50.     }
  51.     public function setUserId(int $userId): self
  52.     {
  53.         $this->userId $userId;
  54.         return $this;
  55.     }
  56.     public function getFieldIdentifier(): ?string
  57.     {
  58.         return $this->fieldIdentifier;
  59.     }
  60.     public function setFieldIdentifier(string $fieldIdentifier): self
  61.     {
  62.         $this->fieldIdentifier $fieldIdentifier;
  63.         return $this;
  64.     }
  65.     public function getIdentifier(): ?string
  66.     {
  67.         return $this->identifier;
  68.     }
  69.     public function setIdentifier(string $identifier): self
  70.     {
  71.         $this->identifier $identifier;
  72.         return $this;
  73.     }
  74.     public function getValue()
  75.     {
  76.         return $this->value;
  77.     }
  78.     public function setValue$value)
  79.     {
  80.         $this->value $value;
  81.         return $this;
  82.     }
  83.     public function getValueArr()
  84.     {
  85.         return json_decode($this->valuetrue);
  86.     }
  87.     public function setValueArr$value)
  88.     {
  89.         $this->value json_encode($value);
  90.         return $this;
  91.     }
  92.     public function getValid(): ?bool
  93.     {
  94.         return $this->valid;
  95.     }
  96.     public function setValid(bool $valid): self
  97.     {
  98.         $this->valid $valid;
  99.         return $this;
  100.     }
  101. }