Browse Source

[Backend] Upload image : essai upload simplifié

packProduct
Guillaume 3 years ago
parent
commit
d1948800ad
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      Definition/Field/PointSale/PointSaleFieldDefinition.php

+ 5
- 0
Definition/Field/PointSale/PointSaleFieldDefinition.php View File

@@ -2,6 +2,7 @@

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;
@@ -9,6 +10,7 @@ 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
{
@@ -54,6 +56,9 @@ class PointSaleFieldDefinition extends AbstractFieldDefinition
'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),

Loading…
Cancel
Save