Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

55 lines
2.7KB

  1. <?php
  2. namespace Lc\CaracoleBundle\Definition\Field\Order;
  3. use EasyCorp\Bundle\EasyAdminBundle\Field\DateTimeField;
  4. use EasyCorp\Bundle\EasyAdminBundle\Field\Field;
  5. use EasyCorp\Bundle\EasyAdminBundle\Field\IntegerField;
  6. use EasyCorp\Bundle\EasyAdminBundle\Field\NumberField;
  7. use EasyCorp\Bundle\EasyAdminBundle\Field\TextareaField;
  8. use EasyCorp\Bundle\EasyAdminBundle\Field\TextField;
  9. use Lc\CaracoleBundle\Context\MerchantContextTrait;
  10. use Lc\CaracoleBundle\Field\AssociationField;
  11. use Lc\SovBundle\Definition\Field\AbstractFieldDefinition;
  12. class OrderShopFieldDefinition extends AbstractFieldDefinition
  13. {
  14. use MerchantContextTrait;
  15. public function configurePanels(): array
  16. {
  17. return [];
  18. }
  19. public function configureFields(): array
  20. {
  21. return [
  22. 'id' => IntegerField::new('id', 'ID'),
  23. 'userLastname' => TextareaField::new('user.lastname', 'field.default.lastname'),
  24. //->setTemplatePath('@LcShop/backend/default/field/textorempty.html.twig'),
  25. 'userFirstname' => TextareaField::new('user.firstname', 'field.default.firstname'),
  26. //->setTemplatePath('@LcShop/backend/default/field/textorempty.html.twig'),
  27. 'userEmail' => TextareaField::new('user.email', 'field.default.email'),
  28. //->setTemplatePath('@LcShop/backend/default/field/user.html.twig'),
  29. 'total' => NumberField::new('total')
  30. ->setTemplatePath('@LcCaracole/admin/order/field/total.html.twig'),
  31. 'orderStatus' => AssociationField::new('orderStatus')
  32. ->setTemplatePath('@LcCaracole/admin/order/field/order_status.html.twig'),
  33. 'createdAt' => DateTimeField::new('createdAt', 'field.OrderShop.createdAt'),
  34. 'updatedAt' => DateTimeField::new('updatedAt', 'field.OrderShop.updatedAt'),
  35. 'orderShopCreatedAt' => DateTimeField::new('orderShopCreatedAt', 'field.OrderShop.createdAt'),
  36. 'cycleNumber' => IntegerField::new('cycleNumber'),
  37. 'cycleDeliveryId' => IntegerField::new('cycleDeliveryId'),
  38. 'cycleId' => IntegerField::new('cycleId'),
  39. 'deliveryType' => Field::new('deliveryType'),
  40. //->setTemplatePath('@LcShop/backend/default/field/options_translatable.html.twig'),
  41. 'reference' => TextField::new('reference'),
  42. 'complementaryOrderShops' => AssociationField::new('complementaryOrderShops')->setFormTypeOption('mapped', false)
  43. ->setTemplatePath('@LcCaracole/admin/order/field/complementary.html.twig'),
  44. 'orderPayments' => AssociationField::new('orderPayments')
  45. ->setTemplatePath('@LcCaracole/admin/order/field/order_payment.html.twig')
  46. ];
  47. }
  48. }