You are here

function configuration_menu_link_load in Configuration Management 7

Load a menu link by its menu_name:link_path identifier.

3 calls to configuration_menu_link_load()
menu_links_configuration_export in includes/configuration.menu.inc
Implements hook_configuration_export().
menu_links_configuration_export_render in includes/configuration.menu.inc
Implements hook_configuration_export_render()
menu_links_configuration_rebuild_ordered in includes/configuration.menu.inc
Generate a depth tree of all menu links.

File

includes/configuration.menu.inc, line 302

Code

function configuration_menu_link_load($identifier) {
  list($menu_name, $link_path) = explode(':', $identifier, 2);
  $link = db_select('menu_links')
    ->fields('menu_links', array(
    'menu_name',
    'mlid',
    'plid',
    'link_path',
    'router_path',
    'link_title',
    'options',
    'module',
    'hidden',
    'external',
    'has_children',
    'expanded',
    'weight',
  ))
    ->condition('menu_name', $menu_name)
    ->condition('link_path', $link_path)
    ->execute()
    ->fetchAssoc();
  if ($link) {
    $link['options'] = unserialize($link['options']);
    return $link;
  }
  return FALSE;
}