|
- <?php
-
- namespace Lc\CaracoleBundle\Definition\Field\PointSale;
-
- use EasyCorp\Bundle\EasyAdminBundle\Field\ImageField;
- use EasyCorp\Bundle\EasyAdminBundle\Field\IntegerField;
- use EasyCorp\Bundle\EasyAdminBundle\Field\TextField;
- use Lc\CaracoleBundle\Field\Address\AddressField;
- use Lc\SovBundle\Definition\Field\AbstractFieldDefinition;
- use Lc\SovBundle\Field\CKEditorField;
- use Lc\SovBundle\Field\ImageManagerField;
- use Lc\SovBundle\Field\StatusField;
- use Lc\SovBundle\Form\Common\FileUploadType;
-
- class PointSaleFieldDefinition extends AbstractFieldDefinition
- {
-
- public function configureIndex(): array
- {
- return [
- 'id',
- 'title',
- 'status'
- ];
- }
-
- public function configurePanels(): array
- {
- return [
- 'main',
- 'address',
- 'seo',
- 'conf',
- ];
- }
-
- public function configurePanelMain(): array
- {
- return [
- 'title',
- 'description',
- 'status'
- ];
- }
-
- public function configurePanelAddress(): array
- {
- return [
- 'address'
- ];
- }
-
- public function configureFields(): array
- {
- return [
- 'id' => IntegerField::new('id')->setSortable(true)->onlyOnIndex(),
- 'title' => TextField::new('title')->setSortable(true),
- 'code' => TextField::new('code'),
- /*'image' => ImageField::new('image')
- ->setUploadDir('public/uploads/images/pointsale')
- ->setFormType(FileUploadType::class),*/
- 'image' => ImageManagerField::new('image'),
- 'description' => CKEditorField::new('description'),
- 'status' => StatusField::new('status')->setSortable(true),
- 'address' => AddressField::new('address')
- ->setRequired(true),
- ];
- }
-
- }
|