8000 minor #4969 Add typehint (piotrantosik) · symfony/symfony-docs@96770aa · GitHub
[go: up one dir, main page]

Skip to content

Commit 96770aa

Browse files
committed
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
2 parents b0d9c5c + 7e7ca06 commit 96770aa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cookbook/form/dynamic_form_modification.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -721,10 +721,11 @@ all of this, use a listener::
721721

722722
use Symfony\Component\Form\FormBuilderInterface;
723723
use Symfony\Component\Form\FormEvents;
724+
use Symfony\Component\Form\FormEvent;
724725

725726
public function buildForm(FormBuilderInterface $builder, array $options)
726727
{
727-
$builder->addEventListener(FormEvents::POST_SUBMIT, function ($event) {
728+
$builder->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) {
728729
$event->stopPropagation();
729730
}, 900); // Always set a higher priority than ValidationListener
730731

0 commit comments

Comments
 (0)
0