We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c60d825 + a687a99 commit 781ca04Copy full SHA for 781ca04
event_dispatcher.rst
@@ -162,7 +162,10 @@ having to add any configuration in external files::
162
}
163
164
165
-You can add multiple ``#[AsEventListener]`` attributes to configure different methods::
+You can add multiple ``#[AsEventListener]`` attributes to configure different methods.
166
+The ``method`` property is optional, and when not defined, it defaults to
167
+``on`` + uppercased event name. In the example below, the ``'foo'`` event listener
168
+doesn't explicitly define its method, so the ``onFoo()`` method will be called::
169
170
namespace App\EventListener;
171
0 commit comments