You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

SubthematicAdminController.php 689B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace Lc\PietroBundle\Controller\Subthematic;
  3. use Lc\PietroBundle\Model\Subthematic;
  4. use EasyCorp\Bundle\EasyAdminBundle\Field\AssociationField;
  5. use EasyCorp\Bundle\EasyAdminBundle\Field\TextField;
  6. use Lc\SovBundle\Controller\AbstractAdminController;
  7. class SubthematicAdminController extends AbstractAdminController
  8. {
  9. public static function getEntityFqcn(): string
  10. {
  11. return Subthematic::class;
  12. }
  13. public function configureFields(string $pageName): iterable
  14. {
  15. return [
  16. TextField::new('name'),
  17. AssociationField::new('thematic')
  18. ->setTemplatePath('crud/field/association.html.twig')
  19. ];
  20. }
  21. }