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.

43 lines
1.5KB

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