Skip to content

Commit

Permalink
Fixed minor issues
Browse files Browse the repository at this point in the history
  • Loading branch information
javiereguiluz committed Sep 2, 2015
1 parent c8c8bf8 commit e56fed8
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions cookbook/event_dispatcher/event_listener.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
----------------------------
Expand All @@ -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
Expand Down

0 comments on commit e56fed8

Please sign in to comment.