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

34 行
1022B

  1. <?php
  2. namespace Lc\SovBundle\Controller\Newsletter;
  3. use EasyCorp\Bundle\EasyAdminBundle\Field\FormField;
  4. use EasyCorp\Bundle\EasyAdminBundle\Field\TextField;
  5. use Lc\SovBundle\Controller\AbstractAdminController;
  6. use Lc\SovBundle\Field\BooleanField;
  7. use Lc\SovBundle\Field\CKEditorField;
  8. use Lc\SovBundle\Field\StatusField;
  9. abstract class NewsletterAdminController 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. BooleanField::new('isMain')
  19. ->setCustomOption('toggle_label', 'Principale'),
  20. CKEditorField::new('description')
  21. ->hideOnIndex(),
  22. StatusField::new('status'),
  23. ],
  24. $panel
  25. );
  26. }
  27. }