Advertisement
Guest User

RegistrationType

a guest
Nov 5th, 2013
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.61 KB | None | 0 0
  1.     <?php
  2. // src/Acme/AccountBundle/Form/Type/RegistrationType.php
  3. namespace Acme\AccountBundle\Form\Type;
  4.  
  5. use Symfony\Component\Form\AbstractType;
  6. use Symfony\Component\Form\FormBuilderInterface;
  7.  
  8.  
  9. class RegistrationType extends AbstractType
  10. {
  11.     public function buildForm(FormBuilderInterface $builder, array $options)
  12.     {
  13.        
  14.         $builder->add('username', 'text')
  15.             ->add('password', 'password')
  16.             ->add('email', 'email')  
  17.             ;
  18.  
  19.         $builder->add('save', 'submit');
  20.     }
  21.  
  22.     public function getName()
  23.     {
  24.         return 'registration';
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement