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 3dc0195 + 781ca04 commit 9a4aa88Copy full SHA for 9a4aa88
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