Skip to content

Commit

Permalink
minor #4969 Add typehint (piotrantosik)
Browse files Browse the repository at this point in the history
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 96770aa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cookbook/form/dynamic_form_modification.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 96770aa

Please sign in to comment.