You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 line
1005B

  1. <?php
  2. namespace Lc\SovBundle\Controller\Site;
  3. use EasyCorp\Bundle\EasyAdminBundle\Field\FormField;
  4. use EasyCorp\Bundle\EasyAdminBundle\Field\NumberField;
  5. use EasyCorp\Bundle\EasyAdminBundle\Field\TextField;
  6. use Lc\SovBundle\Controller\AbstractAdminController;
  7. use Lc\SovBundle\Field\CKEditorField;
  8. use Lc\SovBundle\Field\StatusField;
  9. abstract class PageAdminController extends AbstractAdminController
  10. {
  11. public function configureFields(string $pageName): iterable
  12. {
  13. $panel = parent::configureFields($pageName);
  14. return array_merge(
  15. [
  16. FormField::addPanel('general'),
  17. TextField::new('title'),
  18. NumberField::new('position')
  19. ->hideOnIndex()
  20. ->hideOnForm(),
  21. CKEditorField::new('description'),
  22. StatusField::new('status'),
  23. ],
  24. $panel
  25. );
  26. }
  27. }