This repository was archived by the owner on Sep 16, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -36,14 +36,25 @@ Events
36
36
------
37
37
38
38
Optionally, you can provide an `Event Dispatcher `_ to the dynamic router.
39
- If you do, it will trigger one of the following two events during the match
40
- process, depending on which method is used:
39
+ If you do, it will trigger one of the pre-match events during the match
40
+ process, depending on which method is used and another event before generating
41
+ a URL:
41
42
42
43
* **cmf_routing.pre_dynamic_match ** (Dispatched at the beginning of the
43
44
``match `` method)
44
45
* **cmf_routing.pre_dynamic_match_request ** (Dispatched at the beginning of the
45
46
``matchRequest `` method. In the context of the Symfony2 full stack framework,
46
47
only this event will be triggered.)
48
+ * **cmf_routing.pre_dynamic_generate ** (Dispatched at the beginning of the
49
+ ``generate `` method)
50
+
51
+ ..versionadded:: 1.4
52
+ The route generate event was added in version 1.4 of the routing component.
53
+
54
+ Pre-match events are of class ``Symfony\Cmf\Component\Routing\Event\RouterMatchEvent ``,
55
+ the generate event is of class ``Symfony\Cmf\Component\Routing\Event\RouterGenerateEvent ``.
56
+ The genereate event also allows you to manipulate the route name, parameters and
57
+ reference type in the event, by updating the values in the event.
47
58
48
59
The ``Symfony\Cmf\Component\Routing\Event\Events `` class contains the event
49
60
constants. To learn how to register the events, see
You can’t perform that action at this time.
0 commit comments