vendor/easycorp/easyadmin-bundle/src/Dto/FormVarsDto.php line 12

Open in your IDE?
  1. <?php
  2. namespace EasyCorp\Bundle\EasyAdminBundle\Dto;
  3. /**
  4.  * It stores the variables related to EasyAdmin that are passed to all
  5.  * the form types templates via the `form.vars.ea_vars` variable. It's a similar
  6.  * concept to the variables passed by Symfony via the `form.vars` variable.
  7.  *
  8.  * @author Javier Eguiluz <javier.eguiluz@gmail.com>
  9.  */
  10. final class FormVarsDto
  11. {
  12.     private ?FieldDto $fieldDto;
  13.     private ?EntityDto $entityDto;
  14.     public function __construct(?FieldDto $fieldDto null, ?EntityDto $entityDto null)
  15.     {
  16.         $this->fieldDto $fieldDto;
  17.         $this->entityDto $entityDto;
  18.     }
  19.     public function getField(): ?FieldDto
  20.     {
  21.         return $this->fieldDto;
  22.     }
  23.     public function getEntity(): ?EntityDto
  24.     {
  25.         return $this->entityDto;
  26.     }
  27. }