No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

PointSaleFieldDefinition.php 1.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. namespace Lc\CaracoleBundle\Definition\Field\PointSale;
  3. use EasyCorp\Bundle\EasyAdminBundle\Field\IntegerField;
  4. use EasyCorp\Bundle\EasyAdminBundle\Field\TextEditorField;
  5. use EasyCorp\Bundle\EasyAdminBundle\Field\TextField;
  6. use Lc\CaracoleBundle\Field\Address\AddressField;
  7. use Lc\SovBundle\Definition\Field\AbstractFieldDefinition;
  8. use Lc\SovBundle\Field\StatusField;
  9. class PointSaleFieldDefinition extends AbstractFieldDefinition
  10. {
  11. public function configureIndex(): array
  12. {
  13. return [
  14. 'id',
  15. 'title',
  16. 'status'
  17. ];
  18. }
  19. public function configurePanels(): array
  20. {
  21. return [
  22. 'main',
  23. 'address',
  24. 'seo',
  25. 'conf',
  26. ];
  27. }
  28. public function configurePanelMain(): array
  29. {
  30. return [
  31. 'title',
  32. 'description',
  33. 'status'
  34. ];
  35. }
  36. public function configurePanelAddress(): array
  37. {
  38. return [
  39. 'address'
  40. ];
  41. }
  42. public function configureFields(): array
  43. {
  44. return [
  45. 'id' => IntegerField::new('id')->setSortable(true)->onlyOnIndex(),
  46. 'title' => TextField::new('title')->setSortable(true),
  47. 'description' => TextEditorField::new('description'),
  48. 'status' => StatusField::new('status')->setSortable(true),
  49. 'address' => AddressField::new('address')
  50. ->setRequired(true),
  51. ];
  52. }
  53. }