forked from EasyCorp/EasyAdminBundle
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPageCrudController.php
More file actions
35 lines (30 loc) · 973 Bytes
/
PageCrudController.php
File metadata and controls
35 lines (30 loc) · 973 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
namespace EasyCorp\Bundle\EasyAdminBundle\Tests\TestApplication\Controller\Sort;
use EasyCorp\Bundle\EasyAdminBundle\Config\Crud;
use EasyCorp\Bundle\EasyAdminBundle\Controller\AbstractCrudController;
use EasyCorp\Bundle\EasyAdminBundle\Field\AssociationField;
use EasyCorp\Bundle\EasyAdminBundle\Field\TextField;
use EasyCorp\Bundle\EasyAdminBundle\Tests\TestApplication\Entity\Page;
/**
* @extends AbstractCrudController<Page>
*/
class PageCrudController extends AbstractCrudController
{
public static function getEntityFqcn(): string
{
return Page::class;
}
public function configureFields(string $pageName): iterable
{
return [
TextField::new('name'),
AssociationField::new('website')
->setSortProperty('name'),
];
}
public function configureCrud(Crud $crud): Crud
{
return parent::configureCrud($crud)
->setPaginatorPageSize(100);
}
}