8000 minor #8318 Update events.rst (atailouloute) · symfony/symfony-docs@f663f52 · GitHub
[go: up one dir, main page]

Skip to content

Commit f663f52

Browse files
committed
minor #8318 Update events.rst (atailouloute)
This PR was submitted for the 2.8 branch but it was merged into the 2.7 branch instead (closes #8318). Discussion ---------- Update events.rst Commits ------- b59990c Update events.rst
< 8000 svg aria-hidden="true" focusable="false" class="octicon octicon-git-branch Octicon-sc-9kayk9-0 mr-1" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom">
2 parents b8dcdf9 + b59990c commit f663f52

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

form/events.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,11 @@ callback for better readability::
312312
// src/AppBundle/Form/SubscriptionType.php
313313
namespace AppBundle\Form;
314314

315+
use Symfony\Component\Form\Extension\Core\Type\TextType;
316+
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
317+
use Symfony\Component\Form\FormEvent;
318+
use Symfony\Component\Form\FormEvents;
319+
315320
// ...
316321
class SubscriptionType extends AbstractType
317322
{
@@ -397,6 +402,9 @@ Event subscribers have different uses:
397402
To register the event subscriber, use the ``addEventSubscriber()`` method::
398403

399404
use AppBundle\Form\EventListener\AddEmailFieldListener;
405+
use Symfony\Component\Form\Extension\Core\Type\TextType;
406+
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
407+
400408
// ...
401409

402410
$form = $formFactory->createBuilder()

0 commit comments

Comments
 (0)
0