Form/LoginType.php
public function buildForm(FormBuilderInterface $builder, array $options) {
		$this->_lastUsername = $options['data']['lastUsername'];
		$this->action = $options['data']['action'];
		
		$builder->setAttribute('method', $options['method'])
				->setAttribute('id', $options['id'])
				->setAttribute('legend', $options['legend'])
				->setAttribute('action', $options['data']['action'])
        		//->add('_csrf_token', 'hidden', array('data' => $options['csrfToken']))
        		->add('_username', TextType::class, array('label' => "Nom d'utilisateur", 'data' => $options['data']['lastUsername']))
        		->add('_password', PasswordType::class, array('label' => 'Mot de passe'))
        		->add('_remember_me', CheckboxType::class,array('label' => 'Se souvenir de moi', 'required' => false))
        		->add('sendFormLogin', SubmitType::class, array('label' => 'Connexion'))
                ->add('btnInscription', ButtonType::class, array('label' => 'Inscription', 'attr' => array('onclick' => 'javascript: btnInscriptionFromLogin();')))
                ->add('btnCancel', ResetType::class, array('label' => 'Annuler', 'attr' => array('id' => 'btnCancel')))
        ;
		
        $this->_builder = $builder;
    }
public function buildForm(FormBuilderInterface $builder, array $options) {
		$this->_lastUsername = $options['data']['lastUsername'];
		$this->action = $options['data']['action'];
		
		$builder->setAttribute('method', $options['method'])
				->setAttribute('id', $options['id'])
				->setAttribute('legend', $options['legend'])
				->setAttribute('action', $options['data']['action'])
        		//->add('_csrf_token', 'hidden', array('data' => $options['csrfToken']))
        		->add('_username', TextType::class, array('label' => "Nom d'utilisateur", 'data' => $options['data']['lastUsername']))
        		->add('_password', PasswordType::class, array('label' => 'Mot de passe'))
        		->add('_remember_me', CheckboxType::class,array('label' => 'Se souvenir de moi', 'required' => false))
        		->add('sendFormLogin', SubmitType::class, array('label' => 'Connexion'))
                ->add('btnInscription', ButtonType::class, array('label' => 'Inscription', 'attr' => array('onclick' => 'javascript: btnInscriptionFromLogin();')))
                ->add('btnCancel', ResetType::class, array('label' => 'Annuler', 'attr' => array('id' => 'btnCancel')))
        ;
		
        $this->_builder = $builder;
    }
/*public function __construct(array $aParams) {//$lastUsername, $action) {
$this->_lastUsername = $aParams['lastUsername'];
$this->action = $aParams['action'];
}