FormType/AbstractAttachmentAwareFormType.php
/**
     * @param FormBuilderInterface $builder
     * @param array $options
     */
@param FormBuilderInterface $builder
@param array $options
@param FormBuilderInterface $builder @param array $options
public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $this->innerBuild($builder, $options);
        $builder
            ->add(
                self::FORM_CHILD_ATTACHMENTS,
                FileType::class,
                [
                    'label' => 'attachment',
                    'multiple' => true,
                    'attr' => [
                        'accept' => 'image/*',
                        'multiple' => 'multiple'
                    ],
                    'required' => false,
                    'translation_domain' => 'FOSMessageBundle',
                ]
            )
            ->add(
                self::FORM_CHILD_SAVE,
                SubmitType::class,
                [
                    'label' => 'Save',
                    'translation_domain' => 'FOSMessageBundle',
                ]
            );
    }
public function buildForm ( FormBuilderInterface $ builder , array $ options ) { $ this -> innerBuild ( $ builder , $ options ) ; $ builder -> add ( self :: FORM_CHILD_ATTACHMENTS , FileType :: class , [ 'label' => 'attachment' , 'multiple' => true , 'attr' => [ 'accept' => 'image/*' , 'multiple' => 'multiple' ] , 'required' => false , 'translation_domain' => 'FOSMessageBundle' , ] ) -> add ( self :: FORM_CHILD_SAVE , SubmitType :: class , [ 'label' => 'Save' , 'translation_domain' => 'FOSMessageBundle' , ] ) ; }
@param FormBuilderInterface $builder
 @param array $options
@param FormBuilderInterface $builder @param array $options