Skip to content

Commit

Permalink
Merge branch '7.0' into 7.1
Browse files Browse the repository at this point in the history
* 7.0:
  Add extra information on AsEventListener attribute usage
  • Loading branch information
javiereguiluz committed May 22, 2024
2 parents 3dc0195 + 781ca04 commit 9a4aa88
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion event_dispatcher.rst
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,10 @@ having to add any configuration in external files::
}
}

You can add multiple ``#[AsEventListener]`` attributes to configure different methods::
You can add multiple ``#[AsEventListener]`` attributes to configure different methods.
The ``method`` property is optional, and when not defined, it defaults to
``on`` + uppercased event name. In the example below, the ``'foo'`` event listener
doesn't explicitly define its method, so the ``onFoo()`` method will be called::

namespace App\EventListener;

Expand Down

0 comments on commit 9a4aa88

Please sign in to comment.