Permalink
Browse files

minor #4969 Add typehint (piotrantosik)

This PR was merged into the 2.3 branch.

Discussion
----------

Add typehint

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | 2.3
| Fixed tickets | -

Commits
-------

7e7ca06 add typehint
  • Loading branch information...
wouterj committed Feb 14, 2015
2 parents b0d9c5c + 7e7ca06 commit 96770aa48406f139986f987ccc0bd277501bc4e2
Showing with 2 additions and 1 deletion.
  1. +2 −1 cookbook/form/dynamic_form_modification.rst
@@ -721,10 +721,11 @@ all of this, use a listener::
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\FormEvents;
use Symfony\Component\Form\FormEvent;
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder->addEventListener(FormEvents::POST_SUBMIT, function ($event) {
$builder->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) {
$event->stopPropagation();
}, 900); // Always set a higher priority than ValidationListener

0 comments on commit 96770aa

Please sign in to comment.