← Back
Editing: ReportCommentTemplateCrudController.php
<?php namespace App\Controller\Admin; use App\Controller\Admin\Field\EnumField; use App\Entity\ReportCommentTemplate; use EasyCorp\Bundle\EasyAdminBundle\Config\Crud; use EasyCorp\Bundle\EasyAdminBundle\Controller\AbstractCrudController; use EasyCorp\Bundle\EasyAdminBundle\Field\IdField; use EasyCorp\Bundle\EasyAdminBundle\Field\NumberField; use EasyCorp\Bundle\EasyAdminBundle\Field\TextareaField; class ReportCommentTemplateCrudController extends AbstractCrudController { public static function getEntityFqcn(): string { return ReportCommentTemplate::class; } public function configureCrud(Crud $crud): Crud { return $crud // the visible title at the top of the page and the content of the <title> element // it can include these placeholders: %entity_id%, %entity_label_singular%, %entity_label_plural% ->setPageTitle('index', 'Templates de commentaires'); } public function configureFields(string $pageName): iterable { return [ IdField::new('id')->hideOnForm(), TextareaField::new('comment'), NumberField::new('position'), EnumField::new('reportType', 'Type de signalement'), ]; } }
Save File
Cancel