選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

PointSaleFieldDefinition.php 1.7KB

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