|
123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <?php
-
- namespace Lc\CaracoleBundle\Controller\Product;
-
- use EasyCorp\Bundle\EasyAdminBundle\Field\AssociationField;
- use EasyCorp\Bundle\EasyAdminBundle\Field\FormField;
- use EasyCorp\Bundle\EasyAdminBundle\Field\IntegerField;
- use EasyCorp\Bundle\EasyAdminBundle\Field\NumberField;
- use EasyCorp\Bundle\EasyAdminBundle\Field\TextField;
- use EasyCorp\Bundle\EasyAdminBundle\Field\DateTimeField;
- use Lc\CaracoleBundle\Controller\AdminControllerTrait;
- use Lc\SovBundle\Controller\AbstractAdminController;
- use Lc\SovBundle\Field\CKEditorField;
- use Lc\SovBundle\Field\StatusField;
- use Lc\SovBundle\Field\ToggleField;
-
- abstract class ProductCategoryAdminController extends AbstractAdminController
- {
- use AdminControllerTrait;
-
- public function configureFields(string $pageName): iterable
- {
- return array_merge(
- [
- FormField::addPanel('general'),
- IntegerField::new('id')->onlyOnIndex()->setSortable(true),
- TextField::new('title')->setSortable(true),
- NumberField::new('position')->hideOnForm()->setSortable(true),
- AssociationField::new('parent')->hideOnIndex(),
- DateTimeField::new('createdAt')->setFormat('short')->setSortable(true),
- CKEditorField::new('description')->hideOnIndex(),
- StatusField::new('status')->setSortable(true),
- ToggleField::new('saleStatus')->setSortable(true),
- ToggleField::new('isEligibleTicketRestaurant')->setSortable(true),
-
- ],
- $this->getSeoPanel(),
- $this->getConfPanel()
- );
- }
-
- }
|