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.

ProductCategoryAdminController.php 1.6KB

3 yıl önce
3 yıl önce
3 yıl önce
3 yıl önce
3 yıl önce
3 yıl önce
3 yıl önce
3 yıl önce
3 yıl önce
3 yıl önce
123456789101112131415161718192021222324252627282930313233343536373839404142
  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. }