Skip to content

Instantly share code, notes, and snippets.

@GaylordP
Created October 5, 2017 09:06
Show Gist options
  • Save GaylordP/4ba044263261988b244a37e768d5be4f to your computer and use it in GitHub Desktop.
Save GaylordP/4ba044263261988b244a37e768d5be4f to your computer and use it in GitHub Desktop.
## Formulaire :
->add('mediaPath', FineUploaderTypeExtension::class, [
'label' => 'XXXXXXXXXXX',
'mapped' => false,
])
## Service :
AppBundle\Form\Extension\FineUploaderTypeExtension:
public: false
tags:
- { name: form.type_extension, extended_type: Symfony\Component\Form\Extension\Core\Type\FileType }
# Extension :
namespace AppBundle\Form\Extension;
use Symfony\Component\Form\AbstractTypeExtension;
use Symfony\Component\Form\Extension\Core\Type\FileType;
class FineUploaderTypeExtension extends AbstractTypeExtension
{
public function getExtendedType()
{
return FileType::class;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment