Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e56fed8

Browse files
committed
Fixed minor issues
1 parent c8c8bf8 commit e56fed8

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

cookbook/event_dispatcher/event_listener.rst

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,12 @@ using a special "tag":
103103
``on`` + "camel-cased event name". If the event is ``kernel.exception`` the
104104
method executed by default is ``onKernelException()``.
105105

106-
The other optional tag attribute is called ``priority`` which defaults to ``0``.
107-
This value ranges from ``-255`` to ``255`` and it controls the order in which
108-
listeners are executed (the highest the priority, the earlier a listener is
109-
executed). This is useful when you need to guarantee that one listener is
110-
executed before another.
106+
The other optional tag attribute is called ``priority``, which defaults to
107+
``0`` and it controls the order in which listeners are executed (the highest
108+
the priority, the earlier a listener is executed). This is useful when you
109+
need to guarantee that one listener is executed before another. The priorities
110+
of the internal Symfony events range from ``-255`` to ``255`` but your own
111+
events can use any positive or negative integer.
111112

112113
Creating an Event Subscriber
113114
----------------------------
@@ -119,7 +120,7 @@ they are listening to.
119120

120121
In a given subscriber, different methods can listen to the same event. The order
121122
in which methods are executed is defined by the ``priority`` parameter of each
122-
method (the higher the priority, the earlier the method is called). To learn more
123+
method (the higher the priority the earlier the method is called). To learn more
123124
about event subscribers, read :doc:`/components/event_dispatcher/introduction`.
124125

125126
The following example shows an event subscriber that defines several methods which

0 commit comments

Comments
 (0)