|
- <?php
-
- namespace Lc\CaracoleBundle\Definition\Field\Order;
-
- use EasyCorp\Bundle\EasyAdminBundle\Field\DateTimeField;
- use EasyCorp\Bundle\EasyAdminBundle\Field\Field;
- use EasyCorp\Bundle\EasyAdminBundle\Field\IntegerField;
- use EasyCorp\Bundle\EasyAdminBundle\Field\NumberField;
- use EasyCorp\Bundle\EasyAdminBundle\Field\TextareaField;
- use EasyCorp\Bundle\EasyAdminBundle\Field\TextField;
- use Lc\CaracoleBundle\Context\MerchantContextTrait;
- use Lc\CaracoleBundle\Field\AssociationField;
- use Lc\SovBundle\Definition\Field\AbstractFieldDefinition;
-
- class OrderShopFieldDefinition extends AbstractFieldDefinition
- {
- use MerchantContextTrait;
-
- public function configurePanels(): array
- {
- return [];
- }
-
- public function configureFields(): array
- {
- return [
- 'id' => IntegerField::new('id', 'ID'),
- 'userLastname' => TextareaField::new('user.lastname', 'field.default.lastname'),
- //->setTemplatePath('@LcShop/backend/default/field/textorempty.html.twig'),
- 'userFirstname' => TextareaField::new('user.firstname', 'field.default.firstname'),
- //->setTemplatePath('@LcShop/backend/default/field/textorempty.html.twig'),
- 'userEmail' => TextareaField::new('user.email', 'field.default.email'),
- //->setTemplatePath('@LcShop/backend/default/field/user.html.twig'),
- 'total' => NumberField::new('total')
- ->setTemplatePath('@LcCaracole/admin/order/field/total.html.twig'),
- 'orderStatus' => AssociationField::new('orderStatus')
- ->setTemplatePath('@LcCaracole/admin/order/field/order_status.html.twig'),
- 'createdAt' => DateTimeField::new('createdAt', 'field.OrderShop.createdAt'),
- 'updatedAt' => DateTimeField::new('updatedAt', 'field.OrderShop.updatedAt'),
- 'orderShopCreatedAt' => DateTimeField::new('orderShopCreatedAt', 'field.OrderShop.createdAt'),
- 'cycleNumber' => IntegerField::new('cycleNumber'),
- 'cycleDeliveryId' => IntegerField::new('cycleDeliveryId'),
- 'cycleId' => IntegerField::new('cycleId'),
- 'deliveryType' => Field::new('deliveryType'),
- //->setTemplatePath('@LcShop/backend/default/field/options_translatable.html.twig'),
- 'reference' => TextField::new('reference'),
- 'complementaryOrderShops' => AssociationField::new('complementaryOrderShops')->setFormTypeOption('mapped', false)
- ->setTemplatePath('@LcCaracole/admin/order/field/complementary.html.twig'),
- 'orderPayments' => AssociationField::new('orderPayments')
- ->setTemplatePath('@LcCaracole/admin/order/field/order_payment.html.twig')
-
- ];
- }
-
- }
|