Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

NewsletterFieldDefinition.php 1.1KB

pirms 3 gadiem
123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. namespace Lc\SovBundle\Definition\Field\Newsletter;
  3. use EasyCorp\Bundle\EasyAdminBundle\Field\TextField;
  4. use Lc\SovBundle\Definition\Field\AbstractFieldDefinition;
  5. use Lc\SovBundle\Field\BooleanField;
  6. use Lc\SovBundle\Field\CKEditorField;
  7. class NewsletterFieldDefinition extends AbstractFieldDefinition
  8. {
  9. public function configureIndex(): array
  10. {
  11. return [
  12. 'id',
  13. 'title',
  14. 'isMain',
  15. 'status'
  16. ];
  17. }
  18. public function configurePanels(): array
  19. {
  20. return ['main', 'seo', 'conf'];
  21. }
  22. public function configurePanelMain(): array
  23. {
  24. return [
  25. 'title',
  26. 'description',
  27. 'status'
  28. ];
  29. }
  30. public function configureFields(): array
  31. {
  32. return [
  33. 'title' => TextField::new('title'),
  34. 'description' => CKEditorField::new('description')->hideOnIndex(),
  35. 'isMain' => BooleanField::new('isMain')->setCustomOption('toggle_label', 'Principale'),
  36. ];
  37. }
  38. }