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.

NewsletterAdminController.php 1022B

123456789101112131415161718192021222324252627282930313233
  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. }