src/Form/NotaryType.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Form;
  3. use App\Entity\Notary;
  4. use Karser\Recaptcha3Bundle\Form\Recaptcha3Type;
  5. use Karser\Recaptcha3Bundle\Validator\Constraints\Recaptcha3;
  6. use Symfony\Component\Form\AbstractType;
  7. use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
  8. use Symfony\Component\Form\Extension\Core\Type\PasswordType;
  9. use Symfony\Component\Form\Extension\Core\Type\TextType;
  10. use Symfony\Component\Form\FormBuilderInterface;
  11. use Symfony\Component\OptionsResolver\OptionsResolver;
  12. class NotaryType extends AbstractType
  13. {
  14.     public function buildForm(FormBuilderInterface $builder, array $options)
  15.     {
  16.         $builder
  17.             ->add('name'TextType::class, ['label' => 'Имя''attr' => ['pattern' => '[а-яА-Я]*']])
  18.             ->add('surname'TextType::class, ['label' => 'Фамилия'])
  19.             ->add('patronymic'TextType::class, ['label' => 'Отчество'])
  20.             ->add('phone'TextType::class, ['label' => 'Телефон'])
  21.             ->add('notaryNumber'TextType::class, ['label' => 'Номер нотариуса'])
  22.             ->add('address'TextType::class, ['label' => 'Физический адрес'])
  23.             ->add('email'TextType::class, ['label' => 'Почта'])
  24.             ->add('password'PasswordType::class, ['label' => 'Пароль''required' => false'empty_data' => ''])
  25. //            ->add('payLinkReferralEnabled', CheckboxType::class, ['label' => 'Участие в бонусной программе', 'required' => false])
  26.         ;
  27.     }
  28.     public function configureOptions(OptionsResolver $resolver)
  29.     {
  30.         $resolver->setDefaults([
  31.             'data_class' => Notary::class,
  32.         ]);
  33.     }
  34. }