Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

63 lines
1.5KB

  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. }