Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Form] dynamic_form_modification - Update namespace related to EventSubscriber #20464

Open
wants to merge 1 commit into
base: 7.2
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions form/dynamic_form_modification.rst
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ For better reusability or if there is some heavy logic in your event listener,
you can also move the logic for creating the ``name`` field to an
:ref:`event subscriber <event_dispatcher-using-event-subscribers>`::

// src/Form/EventListener/AddNameFieldSubscriber.php
namespace App\Form\EventListener;
// src/Form/EventSubscriber/AddNameFieldSubscriber.php
namespace App\Form\EventSubscriber;

use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\Form\Extension\Core\Type\TextType;
Expand Down Expand Up @@ -172,7 +172,7 @@ Great! Now use that in your form class::
namespace App\Form\Type;

// ...
use App\Form\EventListener\AddNameFieldSubscriber;
use App\Form\EventSubscriber\AddNameFieldSubscriber;

class ProductType extends AbstractType
{
Expand Down
Loading