Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
38 lines (32 sloc) 938 Bytes
<?php
namespace SMTC\MainBundle\Form\Type;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
class UserProfileType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('username', 'text', array(
'label' => 'Nombre de usuario',
))
->add('profile', new ProfileType(), array(
'label' => 'Perfil',
'attr' => array(
'class' => 'well',
)
))
;
}
public function setDefaultOptions(OptionsResolverInterface $resolver)
{
$resolver->setDefaults(array(
'data_class' => 'SMTC\MainBundle\Entity\User'
));
}
public function getName()
{
return 'user_profile';
}
}