diff --git a/cookbook/event_dispatcher/event_listener.rst b/cookbook/event_dispatcher/event_listener.rst index f736b9208a6..a52732b8c75 100644 --- a/cookbook/event_dispatcher/event_listener.rst +++ b/cookbook/event_dispatcher/event_listener.rst @@ -103,11 +103,12 @@ using a special "tag": ``on`` + "camel-cased event name". If the event is ``kernel.exception`` the method executed by default is ``onKernelException()``. - The other optional tag attribute is called ``priority`` which defaults to ``0``. - This value ranges from ``-255`` to ``255`` and it controls the order in which - listeners are executed (the highest the priority, the earlier a listener is - executed). This is useful when you need to guarantee that one listener is - executed before another. + The other optional tag attribute is called ``priority``, which defaults to + ``0`` and it controls the order in which listeners are executed (the highest + the priority, the earlier a listener is executed). This is useful when you + need to guarantee that one listener is executed before another. The priorities + of the internal Symfony events range from ``-255`` to ``255`` but your own + events can use any positive or negative integer. Creating an Event Subscriber ---------------------------- @@ -119,7 +120,7 @@ they are listening to. In a given subscriber, different methods can listen to the same event. The order in which methods are executed is defined by the ``priority`` parameter of each -method (the higher the priority, the earlier the method is called). To learn more +method (the higher the priority the earlier the method is called). To learn more about event subscribers, read :doc:`/components/event_dispatcher/introduction`. The following example shows an event subscriber that defines several methods which