for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
/*
* This file is part of the Zikula package.
*
* Copyright Zikula - https://ziku.la/
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Zikula\UsersBundle\Controller;
use EasyCorp\Bundle\EasyAdminBundle\Config\Crud;
use EasyCorp\Bundle\EasyAdminBundle\Controller\AbstractCrudController;
use Zikula\UsersBundle\Entity\User;
class UserCrudController extends AbstractCrudController
{
public static function getEntityFqcn(): string
return User::class;
}
public function configureCrud(Crud $crud): Crud
return $crud
->setEntityLabelInSingular('User')
->setEntityLabelInPlural('Users')
->setPageTitle('index', '%entity_label_plural% list')
->setPageTitle('detail', fn (User $user) => $user)
->setPageTitle('edit', fn (User $user) => sprintf('Editing <strong>%s</strong>', $user))
// ->setDateFormat('...')
// ...
;
public function configureFields(string $pageName): iterable
return [
IdField::new('id'),
TextField::new('title'),
TextEditorField::new('description'),
];