summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Gilliland2012-02-13 16:05:42 (GMT)
committerJames Gilliland2012-02-13 16:05:42 (GMT)
commitcf096e698a3bd9ce722614f838b0e43019887dbc (patch)
tree8982bf2b87213b435060d160269598e10a0d4b53
parent86554c8ec6e78584e38cd7a339e839da1776e5f4 (diff)
Stash the Drupal menu item
This will bubble down to the request and since that will be passed around, make a lot of integration with Symfony and transitioning easier.
-rw-r--r--core/lib/Drupal/Core/UrlMatcher.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/lib/Drupal/Core/UrlMatcher.php b/core/lib/Drupal/Core/UrlMatcher.php
index f56b13a..2f2bc62 100644
--- a/core/lib/Drupal/Core/UrlMatcher.php
+++ b/core/lib/Drupal/Core/UrlMatcher.php
@@ -49,6 +49,8 @@ class UrlMatcher extends SymfonyUrlMatcher {
$routes->add(hash('sha256', $router_item['path']), $this->convertDrupalItem($router_item));
if ($ret = $this->matchCollection($pathinfo, $routes)) {
+ // Stash the router item in the attributes why we're transitioning.
+ $ret['drupal_menu_item'] = $router_item;
return $ret;
}
}