Parcourir la source

[Backend] Upload image : essai upload simplifié

packProduct
Guillaume il y a 2 ans
Parent
révision
d1948800ad
1 fichiers modifiés avec 5 ajouts et 0 suppressions
  1. +5
    -0
      Definition/Field/PointSale/PointSaleFieldDefinition.php

+ 5
- 0
Definition/Field/PointSale/PointSaleFieldDefinition.php Voir le fichier

@@ -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),

Chargement…
Annuler
Enregistrer