Skip to content

[EventDispatcher] Document event name is optionnal #21014

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

Closed
wants to merge 1 commit into from
Closed
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
5 changes: 3 additions & 2 deletions components/event_dispatcher.rst
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,9 @@ Dispatch the Event

The :method:`Symfony\\Component\\EventDispatcher\\EventDispatcher::dispatch`
method notifies all listeners of the given event. It takes two arguments:
the ``Event`` instance to pass to each listener of that event and the name
of the event to dispatch::
the ``Event`` instance to pass to each listener of that event and optionally the
name of the event to dispatch. If it's not defined, the class of the ``Event``
instance will be used::

use Acme\Store\Event\OrderPlacedEvent;
use Acme\Store\Order;
Expand Down
Loading