コード例 #1
0
 /**
  * {@inheritdoc}
  */
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     parent::buildForm($builder, $options);
     // remove the password as we don't want other users to be able to
     // change the password
     $builder->remove('plainPassword');
 }
コード例 #2
0
 /**
  * {@inheritdoc}
  */
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     parent::buildForm($builder, $options);
     // make the password field optional, as we don't want to change this
     // everytime we edit our user
     $builder->get('plainPassword')->setRequired(false);
 }