# Code Coverage for /home/users/tracer/www/spookie.lab.24unix.net/Spookie/src/Controller/Admin/PagesCrudController.php

| Code Coverage
| Lines | Functions and Methods | Classes and Traits
Total | 0.00% covered (danger) | 0.00% | 0 / 7 | 0.00% covered (danger) | 0.00% | 0 / 2 | CRAP | 0.00% covered (danger) | 0.00% | 0 / 1
PagesCrudController | 0.00% covered (danger) | 0.00% | 0 / 7 | 0.00% covered (danger) | 0.00% | 0 / 2 | 6 | 0.00% covered (danger) | 0.00% | 0 / 1
getEntityFqcn | 0.00% covered (danger) | 0.00% | 0 / 1 | 0.00% covered (danger) | 0.00% | 0 / 1 | 2 |
configureFields | 0.00% covered (danger) | 0.00% | 0 / 6 | 0.00% covered (danger) | 0.00% | 0 / 1 | 2 |

1 | <?php
2 |
3 | namespace App\Controller\Admin;
4 |
5 | use App\Entity\Pages;
6 | use EasyCorp\Bundle\EasyAdminBundle\Controller\AbstractCrudController;
7 | use EasyCorp\Bundle\EasyAdminBundle\Field\AssociationField;
8 | use EasyCorp\Bundle\EasyAdminBundle\Field\CodeEditorField;
9 | use EasyCorp\Bundle\EasyAdminBundle\Field\IdField;
10 | use EasyCorp\Bundle\EasyAdminBundle\Field\TextareaField;
11 | use EasyCorp\Bundle\EasyAdminBundle\Field\TextEditorField;
12 | use EasyCorp\Bundle\EasyAdminBundle\Field\TextField;
13 |
14 | class PagesCrudController extends AbstractCrudController
15 | {
16 | public static function getEntityFqcn(): string
17 | {
18 | return Pages::class;
19 | }
20 |
21 | public function configureFields(string $pageName): iterable
22 | {
23 | yield IdField::new(propertyName: 'id')
24 | ->onlyOnIndex();
25 | yield TextField::new(propertyName: 'name');
26 | yield AssociationField::new(propertyName: 'owner');
27 | // yield CodeEditorField::new(propertyName: 'content')
28 | yield TextEditorField::new(propertyName: 'content')
29 | ->onlyOnForms();
30 | }
31 | }