<?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\FormFieldOptionRepository")
*/
class FormFieldOption
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="bigint")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $value;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\FormField", inversedBy="formFieldOptions")
* @ORM\JoinColumn(name="form_field_id", referencedColumnName="id", onDelete="SET NULL")
*/
private $formField;
public function __construct ()
{
$this->value = "";
}
public function getId()
{
return $this->id;
}
public function getValue(): ?string
{
return $this->value;
}
public function setValue(string $value = null): self
{
$this->value = $value ? $value : "";
return $this;
}
public function getFormField(): ?FormField
{
return $this->formField;
}
public function setFormField(?FormField $formField = null): self
{
$this->formField = $formField;
return $this;
}
public function __toString ()
{
return $this->value ? $this->value : '';
}
}