<?php

namespace App\Controller\Admin;

use App\Entity\Subthematic;
use EasyCorp\Bundle\EasyAdminBundle\Field\AssociationField;
use EasyCorp\Bundle\EasyAdminBundle\Field\TextField;
use Lc\SovBundle\Controller\AbstractAdminController as AbstractCrudController;

class SubthematicCrudController extends AbstractCrudController
{
    public static function getEntityFqcn(): string
    {
        return Subthematic::class;
    }

    public function configureFields(string $pageName): iterable
    {
        return [
            TextField::new('name'),
            AssociationField::new('thematic')
                ->setTemplatePath('crud/field/association.html.twig')
        ];
    }

}
