|
1234567891011121314151617181920212223242526272829303132333435363738 |
- <?php
-
- namespace Lc\SovBundle\Controller\Site;
-
- use EasyCorp\Bundle\EasyAdminBundle\Field\DateField;
- use EasyCorp\Bundle\EasyAdminBundle\Field\FormField;
- use EasyCorp\Bundle\EasyAdminBundle\Field\NumberField;
- use EasyCorp\Bundle\EasyAdminBundle\Field\TextField;
- use Lc\SovBundle\Controller\AbstractAdminController;
- use Lc\SovBundle\Field\CKEditorField;
- use Lc\SovBundle\Field\ImageManagerField;
- use Lc\SovBundle\Field\StatusField;
-
- abstract class NewsAdminController extends AbstractAdminController
- {
-
- public function configureFields(string $pageName): iterable
- {
- $panel = parent::configureFields($pageName);
-
- return array_merge(
- [
- FormField::addPanel('general'),
- TextField::new('title'),
- DateField::new('date')
- ->setFormat('d/MM/y'),
- NumberField::new('position')
- ->hideOnIndex()
- ->hideOnForm(),
- CKEditorField::new('description'),
- StatusField::new('status'),
- ],
- $panel
- );
- }
-
-
- }
|