function menu_links_configuration_export_options in Configuration Management 7
Implements hook_configuration_export_options().
1 call to menu_links_configuration_export_options()
- configuration_hash_menu_links in includes/
configuration.menu.inc
File
- includes/
configuration.menu.inc, line 133
Code
function menu_links_configuration_export_options() {
global $menu_admin;
// Need to set this to TRUE in order to get menu links that the
// current user may not have access to (i.e. user/login)
$menu_admin = TRUE;
$menu_links = menu_parent_options(menu_get_menus(), array(
'mlid' => 0,
));
$options = array();
foreach ($menu_links as $key => $name) {
list($menu_name, $mlid) = explode(':', $key, 2);
if ($mlid != 0) {
$link = menu_link_load($mlid);
$identifier = menu_links_configuration_identifier($link);
$options[$identifier] = "{$menu_name}: {$name}";
}
}
$menu_admin = FALSE;
return $options;
}