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

  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 readonly class FormVarsDto
  11. {
  12.     public function __construct(private ?FieldDto $fieldDto null, private ?EntityDto $entityDto null)
  13.     {
  14.     }
  15.     public function getField(): ?FieldDto
  16.     {
  17.         return $this->fieldDto;
  18.     }
  19.     public function getEntity(): ?EntityDto
  20.     {
  21.         return $this->entityDto;
  22.     }
  23. }