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

43 行
1.6KB

  1. <?php
  2. namespace Lc\CaracoleBundle\Controller\Product;
  3. use EasyCorp\Bundle\EasyAdminBundle\Field\AssociationField;
  4. use EasyCorp\Bundle\EasyAdminBundle\Field\FormField;
  5. use EasyCorp\Bundle\EasyAdminBundle\Field\IntegerField;
  6. use EasyCorp\Bundle\EasyAdminBundle\Field\NumberField;
  7. use EasyCorp\Bundle\EasyAdminBundle\Field\TextField;
  8. use EasyCorp\Bundle\EasyAdminBundle\Field\DateTimeField;
  9. use Lc\CaracoleBundle\Controller\AdminControllerTrait;
  10. use Lc\SovBundle\Controller\AbstractAdminController;
  11. use Lc\SovBundle\Field\CKEditorField;
  12. use Lc\SovBundle\Field\StatusField;
  13. use Lc\SovBundle\Field\ToggleField;
  14. abstract class ProductCategoryAdminController extends AbstractAdminController
  15. {
  16. use AdminControllerTrait;
  17. public function configureFields(string $pageName): iterable
  18. {
  19. return array_merge(
  20. [
  21. FormField::addPanel('general'),
  22. IntegerField::new('id')->onlyOnIndex()->setSortable(true),
  23. TextField::new('title')->setSortable(true),
  24. NumberField::new('position')->hideOnForm()->setSortable(true),
  25. AssociationField::new('parent')->hideOnIndex(),
  26. DateTimeField::new('createdAt')->setFormat('short')->setSortable(true),
  27. CKEditorField::new('description')->hideOnIndex(),
  28. StatusField::new('status')->setSortable(true),
  29. ToggleField::new('saleStatus')->setSortable(true),
  30. ToggleField::new('isEligibleTicketRestaurant')->setSortable(true),
  31. ],
  32. $this->getSeoPanel(),
  33. $this->getConfPanel()
  34. );
  35. }
  36. }