updrade with rector

This commit is contained in:
2022-05-03 14:52:04 +02:00
parent d1e613ecc6
commit 6e30560cb9
135 changed files with 5609 additions and 4008 deletions

View File

@@ -0,0 +1,30 @@
<?php
namespace App\Controller\Admin;
use App\Entity\Pages;
use EasyCorp\Bundle\EasyAdminBundle\Controller\AbstractCrudController;
use EasyCorp\Bundle\EasyAdminBundle\Field\AssociationField;
use EasyCorp\Bundle\EasyAdminBundle\Field\CodeEditorField;
use EasyCorp\Bundle\EasyAdminBundle\Field\IdField;
use EasyCorp\Bundle\EasyAdminBundle\Field\TextareaField;
use EasyCorp\Bundle\EasyAdminBundle\Field\TextField;
class PagesCrudController extends AbstractCrudController
{
public static function getEntityFqcn(): string
{
return Pages::class;
}
public function configureFields(string $pageName): iterable
{
yield IdField::new(propertyName: 'id')
->onlyOnIndex();
yield TextField::new(propertyName: 'name');
yield AssociationField::new(propertyName: 'owner');
// yield CodeEditorField::new(propertyName: 'content')
yield TextareaField::new(propertyName: 'content')
->onlyOnForms();
}
}