Created
July 12, 2011 20:11
-
-
Save codecowboy/1078865 to your computer and use it in GitHub Desktop.
ProfileFormType
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* This file is part of the FOSUserBundle package. | |
* | |
* (c) FriendsOfSymfony <http://friendsofsymfony.github.com/> | |
* | |
* For the full copyright and license information, please view the LICENSE | |
* file that was distributed with this source code. | |
*/ | |
namespace Gymloop\CoreBundle\Form; | |
use Symfony\Component\Form\AbstractType; | |
use Symfony\Component\Form\FormBuilder; | |
class ProfileFormType extends \FOS\UserBundle\Form\Type\ProfileFormType | |
{ | |
public function buildUserForm(FormBuilder $builder, array $options) | |
{ | |
$builder | |
->add('first_name') | |
->add('last_name') | |
->add('username') | |
->add('email') | |
//->add('plainPassword', 'repeated', array('type' => 'password', 'options' => array('required' => false))) | |
//->add('programmes', new ProgrammeType()); | |
->add('programmes', 'collection', array( | |
'type' => new ProgrammeType())); | |
} | |
public function getName() | |
{ | |
return 'gymloop_profile_type'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment