src/Flexy/FrontBundle/Entity/FormField.php line 11

  1. <?php
  2. namespace App\Flexy\FrontBundle\Entity;
  3. use ApiPlatform\Metadata\ApiResource;
  4. use App\Repository\Entity\FormFieldRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassFormFieldRepository::class)]
  7. #[ApiResource]
  8. class FormField
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     private ?int $id null;
  14.     #[ORM\ManyToOne(inversedBy'formFields')]
  15.     private ?Form $form null;
  16.     #[ORM\Column(length255)]
  17.     private ?string $label null;
  18.     #[ORM\Column(length255)]
  19.     private ?string $type null;
  20.     #[ORM\Column(nullabletrue)]
  21.     private ?bool $required null;
  22.     #[ORM\Column(length255)]
  23.     private ?string $name null;
  24.     #[ORM\Column(nullabletrue)]
  25.     private ?int $gridColumns null;
  26.     #[ORM\Column(length255nullabletrue)]
  27.     private ?string $cssClasses null;
  28.     public function getId(): ?int
  29.     {
  30.         return $this->id;
  31.     }
  32.     public function getForm(): ?Form
  33.     {
  34.         return $this->form;
  35.     }
  36.     public function setForm(?Form $form): static
  37.     {
  38.         $this->form $form;
  39.         return $this;
  40.     }
  41.     public function getLabel(): ?string
  42.     {
  43.         return $this->label;
  44.     }
  45.     public function setLabel(string $label): static
  46.     {
  47.         $this->label $label;
  48.         return $this;
  49.     }
  50.     public function getType(): ?string
  51.     {
  52.         return $this->type;
  53.     }
  54.     public function setType(string $type): static
  55.     {
  56.         $this->type $type;
  57.         return $this;
  58.     }
  59.     public function isRequired(): ?bool
  60.     {
  61.         return $this->required;
  62.     }
  63.     public function setRequired(?bool $required): static
  64.     {
  65.         $this->required $required;
  66.         return $this;
  67.     }
  68.     public function getName(): ?string
  69.     {
  70.         return $this->name;
  71.     }
  72.     public function setName(string $name): static
  73.     {
  74.         $this->name $name;
  75.         return $this;
  76.     }
  77.     public function getGridColumns(): ?int
  78.     {
  79.         return $this->gridColumns;
  80.     }
  81.     public function setGridColumns(?int $gridColumns): static
  82.     {
  83.         $this->gridColumns $gridColumns;
  84.         return $this;
  85.     }
  86.     public function getCssClasses(): ?string
  87.     {
  88.         return $this->cssClasses;
  89.     }
  90.     public function setCssClasses(?string $cssClasses): static
  91.     {
  92.         $this->cssClasses $cssClasses;
  93.         return $this;
  94.     }
  95. }