deblan.tv/vendor/trinity/src/Trinity/Bundle/UserBundle/Form/Type/MyProfileType.php
2015-03-02 21:57:49 +01:00

33 lines
954 B
PHP

<?php
namespace Trinity\Bundle\UserBundle\Form\Type;
use Symfony\Component\Form\FormBuilderInterface;
use FOS\UserBundle\Form\Type\ProfileFormType as BaseType;
use Trinity\Bundle\UserBundle\Form\Type\ProfileType;
class MyProfileType extends BaseType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
parent::buildForm($builder, $options);
$builder->add('plainPassword', 'repeated', array(
'type' => 'password',
'options' => array('translation_domain' => 'FOSUserBundle'),
'required' => false,
'first_options' => array('label' => 'form.new_password'),
'second_options' => array('label' => 'form.password_confirmation'),
'invalid_message' => 'fos_user.password.mismatch',
));
$builder->add('profile', new ProfileType());
}
public function getName()
{
return 'trinity_user_profile';
}
}