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.
|
- <?php
-
- namespace Lc\PietroBundle\Controller\Subthematic;
-
- use Lc\PietroBundle\Container\Subthematic\SubthematicContainer;
- use EasyCorp\Bundle\EasyAdminBundle\Field\AssociationField;
- use EasyCorp\Bundle\EasyAdminBundle\Field\TextField;
- use Lc\PietroBundle\Controller\AbstractAdminController;
-
- abstract class SubthematicAdminController extends AbstractAdminController
- {
- public function createEntity(string $entityFqcn)
- {
- return $this->getSubthematicContainer()->getFactory()->create();
- }
-
- public function configureFields(string $pageName): iterable
- {
- return [
- TextField::new('name'),
- AssociationField::new('thematic')
- ->setTemplatePath('crud/field/association.html.twig')
- ];
- }
-
- }
|