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
3namespace App\Controller\Admin;
4
5use App\Entity\Pages;
6use EasyCorp\Bundle\EasyAdminBundle\Controller\AbstractCrudController;
7use EasyCorp\Bundle\EasyAdminBundle\Field\AssociationField;
8use EasyCorp\Bundle\EasyAdminBundle\Field\CodeEditorField;
9use EasyCorp\Bundle\EasyAdminBundle\Field\IdField;
10use EasyCorp\Bundle\EasyAdminBundle\Field\TextareaField;
11use EasyCorp\Bundle\EasyAdminBundle\Field\TextEditorField;
12use EasyCorp\Bundle\EasyAdminBundle\Field\TextField;
13
14class 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}