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.

PointSaleAdminController.php 1.2KB

3 年之前
12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. namespace Lc\CaracoleBundle\Controller\PointSale;
  3. use EasyCorp\Bundle\EasyAdminBundle\Field\FormField;
  4. use EasyCorp\Bundle\EasyAdminBundle\Field\NumberField;
  5. use EasyCorp\Bundle\EasyAdminBundle\Field\TextField;
  6. use Lc\CaracoleBundle\Controller\AdminControllerTrait;
  7. use Lc\CaracoleBundle\Field\Address\AddressField;
  8. use Lc\SovBundle\Controller\AbstractAdminController;
  9. use Lc\SovBundle\Field\StatusField;
  10. abstract class PointSaleAdminController extends AbstractAdminController
  11. {
  12. use AdminControllerTrait;
  13. public function configureFields(string $pageName): iterable
  14. {
  15. $panel = parent::configureFields($pageName);
  16. return array_merge(
  17. [
  18. FormField::addPanel('general'),
  19. TextField::new('title'),
  20. NumberField::new('orderAmountMin')
  21. ->setCustomOption('appendHtml','€')
  22. ->hideOnIndex(),
  23. StatusField::new('status'),
  24. FormField::addPanel('address'),
  25. AddressField::new('address')
  26. ->setRequired(true)
  27. ],
  28. $panel
  29. );
  30. }
  31. }