function _i18n_menu_get_router in Internationalization 7
Get the menu router for this router path.
We need the untranslated title to compare, and this will be fast. There's no api function to do this?
Parameters
string $path: The path to fetch from the router.
1 call to _i18n_menu_get_router()
- _i18n_menu_link_localizable_properties in i18n_menu/
i18n_menu.module - Get localizable properties for menu link checking against the router item.
File
- i18n_menu/
i18n_menu.module, line 636 - Internationalization (i18n) submodule: Menu translation.
Code
function _i18n_menu_get_router($path) {
$cache =& drupal_static(__FUNCTION__, array());
if (!array_key_exists($path, $cache)) {
$cache[$path] = db_select('menu_router', 'mr')
->fields('mr', array(
'title',
'title_callback',
'description',
))
->condition('path', $path)
->execute()
->fetchAssoc();
}
return $cache[$path];
}