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.

46 lines
1.6KB

  1. <?php
  2. namespace Lc\CaracoleBundle\Controller\Product;
  3. //use Lc\CaracoleBundle\Field\AssociationField;
  4. use EasyCorp\Bundle\EasyAdminBundle\Field\AssociationField;
  5. use EasyCorp\Bundle\EasyAdminBundle\Field\FormField;
  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\Container\Order\OrderShopContainer;
  10. use Lc\CaracoleBundle\Controller\AdminControllerTrait;
  11. use Lc\CaracoleBundle\Field\Address\AddressField;
  12. use Lc\CaracoleBundle\Repository\Reduction\ReductionCatalogStore;
  13. use Lc\SovBundle\Controller\AbstractAdminController;
  14. use Lc\SovBundle\Field\BooleanField;
  15. use Lc\SovBundle\Field\CKEditorField;
  16. use Lc\SovBundle\Field\StatusField;
  17. use Lc\SovBundle\Field\ToggleField;
  18. use Lc\SovBundle\Translation\TranslatorAdmin;
  19. abstract class ProductCategoryAdminController extends AbstractAdminController
  20. {
  21. use AdminControllerTrait;
  22. public function configureFields(string $pageName): iterable
  23. {
  24. return array_merge(
  25. [
  26. FormField::addPanel('general'),
  27. TextField::new('title'),
  28. NumberField::new('position')->hideOnForm(),
  29. AssociationField::new('parent')->hideOnIndex(),
  30. DateTimeField::new('createdAt')->setFormat('short'),
  31. CKEditorField::new('description')->hideOnIndex(),
  32. ToggleField::new('saleStatus'),
  33. StatusField::new('status'),
  34. ],
  35. $this->getSeoPanel(),
  36. $this->getConfPanel()
  37. );
  38. }
  39. }