| Total Complexity | 2 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 15 | final class ArticleUserCommentType extends AbstractResourceType |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * {@inheritdoc} |
||
| 19 | */ |
||
| 20 | public function buildForm(FormBuilderInterface $builder, array $options): void |
||
| 21 | { |
||
| 22 | $builder |
||
| 23 | ->add('name', TextType::class, [ |
||
| 24 | 'required' => true, |
||
| 25 | 'label' => 'odiseo_blog.form.name', |
||
| 26 | ]) |
||
| 27 | ->add('email', EmailType::class, [ |
||
| 28 | 'required' => true, |
||
| 29 | 'label' => 'odiseo_blog.form.email', |
||
| 30 | ]) |
||
| 31 | ->add('comment', TextareaType::class, [ |
||
| 32 | 'required' => true, |
||
| 33 | 'label' => 'odiseo_blog.form.comment', |
||
| 34 | ]) |
||
| 35 | ->add('recaptcha', EWZRecaptchaType::class, [ |
||
| 36 | 'mapped' => false, |
||
| 37 | 'constraints' => [ |
||
| 38 | new RecaptchaTrue([ |
||
| 39 | 'groups' => ['odiseo_user_comment'] |
||
| 40 | ]) |
||
| 41 | ] |
||
| 42 | ]) |
||
| 43 | ; |
||
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * {@inheritdoc} |
||
| 48 | */ |
||
| 49 | public function getBlockPrefix(): string |
||
| 52 | } |
||
| 53 | } |
||
| 54 |