Skip to content

Instantly share code, notes, and snippets.

View GaylordP's full-sized avatar

Gaylord POILLON GaylordP

View GitHub Profile
<?php
namespace GaylordP\FormFontAwesomeBundle\Form;
use Symfony\Component\Form\AbstractTypeExtension;
use Symfony\Component\Form\Extension\Core\Type\FormType;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\Form\FormView;
use Symfony\Component\OptionsResolver\OptionsResolver;
public function delete(Request $request, UserInterface $user, Color $color): Response
{
if (!$this->isCsrfTokenValid('delete', $request->request->get('token'))) {
return $this->render('administration/color/delete.html.twig', [
'color' => $color,
]);
}
class PersonneVersionType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('emails', CollectionType::class, [
'entry_type' => PersonneVersionEmailType::class,
'label' => false,
'allow_add' => true,
'allow_delete' => true,
## Formulaire :
->add('mediaPath', FineUploaderTypeExtension::class, [
'label' => 'XXXXXXXXXXX',
'mapped' => false,
])
## Service :
AppBundle\Form\Extension\FineUploaderTypeExtension:
public: false