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.

67 lines
1.7KB

  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\CKEditorField;
  9. use Lc\SovBundle\Field\ImageManagerField;
  10. use Lc\SovBundle\Field\StatusField;
  11. class PointSaleFieldDefinition extends AbstractFieldDefinition
  12. {
  13. public function configureIndex(): array
  14. {
  15. return [
  16. 'id',
  17. 'title',
  18. 'status'
  19. ];
  20. }
  21. public function configurePanels(): array
  22. {
  23. return [
  24. 'main',
  25. 'address',
  26. 'seo',
  27. 'conf',
  28. ];
  29. }
  30. public function configurePanelMain(): array
  31. {
  32. return [
  33. 'title',
  34. 'description',
  35. 'status'
  36. ];
  37. }
  38. public function configurePanelAddress(): array
  39. {
  40. return [
  41. 'address'
  42. ];
  43. }
  44. public function configureFields(): array
  45. {
  46. return [
  47. 'id' => IntegerField::new('id')->setSortable(true)->onlyOnIndex(),
  48. 'title' => TextField::new('title')->setSortable(true),
  49. 'code' => TextField::new('code'),
  50. 'image' => ImageManagerField::new('image'),
  51. 'description' => CKEditorField::new('description'),
  52. 'status' => StatusField::new('status')->setSortable(true),
  53. 'address' => AddressField::new('address')
  54. ->setRequired(true),
  55. ];
  56. }
  57. }