您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

35 行
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. }