function admin_menu_translate

cis7 admin_menu.inc admin_menu_translate($router_item, $map)
cle7 admin_menu.inc admin_menu_translate($router_item, $map)
elmsmedia7 admin_menu.inc admin_menu_translate($router_item, $map)
icor7 admin_menu.inc admin_menu_translate($router_item, $map)
meedjum_blog7 admin_menu.inc admin_menu_translate($router_item, $map)
mooc7 admin_menu.inc admin_menu_translate($router_item, $map)

Translate an expanded router item into a menu link suitable for rendering.

Parameters

$router_item: A menu router item.

$map: A path map with placeholders replaced.

1 call to admin_menu_translate()
admin_menu_merge_tree in sites/all/modules/ulmus/admin_menu/admin_menu.inc
Walk through the entire menu tree and merge in expanded dynamic menu links.

File

sites/all/modules/ulmus/admin_menu/admin_menu.inc, line 257
Menu builder functions for Administration menu.

Code

function admin_menu_translate($router_item, $map) {
  _menu_translate($router_item, $map, TRUE);

  // Run through hook_translated_menu_link_alter() to add devel information,
  // if configured.
  $router_item['menu_name'] = 'management';
  // @todo Invoke as usual like _menu_link_translate().
  admin_menu_translated_menu_link_alter($router_item, NULL);

  if ($router_item['access']) {
    // Override mlid to make this item unique; since these items are expanded
    // from dynamic items, the mlid is always the same, so each item would
    // replace any other.
    // @todo Doing this instead leads to plenty of duplicate links below
    //   admin/structure/menu; likely a hidden recursion problem.
    // $router_item['mlid'] = $router_item['href'] . $router_item['mlid'];
    $router_item['mlid'] = $router_item['href'];
    // Turn menu callbacks into regular menu items to make them visible.
    if ($router_item['type'] == MENU_CALLBACK) {
      $router_item['type'] = MENU_NORMAL_ITEM;
    }

    // @see _menu_tree_check_access()
    $key = (50000 + $router_item['weight']) . ' ' . $router_item['title'] . ' ' . $router_item['mlid'];
    return array($key => array(
      'link' => $router_item,
      'below' => array(),
    ));
  }

  return array();
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.