您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

27 行
689B

  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. }