Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protected function matchDrupalItem($path) {
- // For now we can just proxy our procedural method. At some point this will
- // become more complicated because we'll need to get back candidates for a
- // path and them resolve them based on things like method and scheme which
- // we currently can't do.
- $item = menu_get_item($path);
- $path_elements = explode('/', $item['path']);
- $i = 0;
- foreach ($path_elements as $key => $element) {
- if ($element == '%') {
- $path_elements[$key] = "{arg$i}";
- $i++;
- }
- }
- $item['path'] = implode('/', $path_elements);
- return $item;
- }
Advertisement
Add Comment
Please, Sign In to add comment