]> Raphaƫl G. Git Repositories - airbundle/blob - Form/RegisterType.php
Rewrite Inkscape XML to clean manual SVG
[airbundle] / Form / RegisterType.php
1 <?php
2
3 namespace Rapsys\AirBundle\Form;
4
5 use Symfony\Component\Form\Extension\Core\Type\TelType;
6 use Symfony\Component\Form\Extension\Core\Type\UrlType;
7 use Symfony\Component\Form\FormBuilderInterface;
8 use Symfony\Component\Validator\Constraints\NotBlank;
9
10 class RegisterType extends \Rapsys\UserBundle\Form\RegisterType {
11 /**
12 * {@inheritdoc}
13 */
14 public function buildForm(FormBuilderInterface $builder, array $options) {
15 return parent::buildForm($builder, $options)
16 #TODO: add url ? add text ?
17 ->add('phone', TelType::class, ['attr' => ['placeholder' => 'Your phone'], 'constraints' => [new NotBlank(['message' => 'Please provide your phone'])]])
18 ->add('donation', UrlType::class, ['attr' => ['placeholder' => 'Your donation link']])
19 ->add('site', UrlType::class, ['attr' => ['placeholder' => 'Your website']]);
20 }
21
22 /**
23 * {@inheritdoc}
24 */
25 public function getName() {
26 return 'rapsys_air_register';
27 }
28 }