You are here

function features_menu_link_load in Features 7

Same name and namespace in other branches
  1. 6 includes/features.menu.inc \features_menu_link_load()
  2. 7.2 includes/features.menu.inc \features_menu_link_load()

Load a menu link by its menu_name:link_path identifier.

3 calls to features_menu_link_load()
menu_links_features_export in includes/features.menu.inc
Implements hook_features_export().
menu_links_features_export_render in includes/features.menu.inc
Implements hook_features_export_render()
menu_links_features_rebuild_ordered in includes/features.menu.inc
Generate a depth tree of all menu links.

File

includes/features.menu.inc, line 297

Code

function features_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;
}