Created
October 10, 2014 16:05
-
-
Save ajaypatelbardoli/18ef99a3d0bd1198debc to your computer and use it in GitHub Desktop.
ProfileFormType Class
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 | |
namespace XXXX\Bundle\UserBundle\Form\Type; | |
use Symfony\Component\Form\AbstractType; | |
use Symfony\Component\Form\FormBuilderInterface; | |
use Symfony\Component\OptionsResolver\OptionsResolverInterface; | |
class ProfileFormType extends AbstractType { | |
public function buildForm(FormBuilderInterface $builder, array $options) | |
{ | |
$builder->add('firstName','text'); | |
$builder->add('lastName','text'); | |
$builder->add('zipcode','text'); | |
$builder->add('phoneNo1','text'); | |
$builder->add('phoneNo2','text'); | |
} | |
public function setDefaultOptions(OptionsResolverInterface $resolver) | |
{ | |
$resolver->setDefaults(array( | |
'data_class' => 'XXXX\Bundle\UserBundle\Entity\Profile' | |
)); | |
} | |
public function getName() | |
{ | |
return 'xxx_user_profile'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment