|
- <?php
-
- namespace Lc\CaracoleBundle\Controller\Merchant;
-
- use EasyCorp\Bundle\EasyAdminBundle\Field\AssociationField;
- use EasyCorp\Bundle\EasyAdminBundle\Field\FormField;
- use EasyCorp\Bundle\EasyAdminBundle\Field\NumberField;
- use EasyCorp\Bundle\EasyAdminBundle\Field\TextField;
- use Lc\CaracoleBundle\Controller\AdminControllerTrait;
- use Lc\CaracoleBundle\Field\Address\AddressField;
- use Lc\SovBundle\Controller\AbstractAdminController;
- use Lc\SovBundle\Field\CKEditorField;
- use Lc\SovBundle\Field\StatusField;
-
- abstract class MerchantAdminController extends AbstractAdminController
- {
- use AdminControllerTrait;
-
- public function configureFields(string $pageName): iterable
- {
- $panel = parent::configureFields($pageName);
-
- return array_merge(
- [
- FormField::addPanel('general'),
- TextField::new('title'),
- NumberField::new('position')
- ->hideOnForm()
- ->hideOnIndex(),
- CKEditorField::new('description')
- ->hideOnIndex(),
- AssociationField::new('taxRate')
- ->setRequired(true)
- ->hideOnIndex(),
- StatusField::new('status'),
-
- FormField::addPanel('address'),
- AddressField::new('address')
-
- ],
- $panel
- );
- }
-
- }
|