function admin_menu_link_build in Administration menu 6
Prepare a menu link from basic information formatted for a router item.
3 calls to admin_menu_link_build()
- admin_menu_adjust_items in ./
admin_menu.inc - Add some hard-coded features for better user experience.
- admin_menu_link_save in ./
admin_menu.inc - Convenience function that looks up the plid if $item['parent_path'] is set.
- _admin_menu_rebuild_links in ./
admin_menu.inc - The key function that builds the menu links whenever there is a menu rebuild.
File
- ./
admin_menu.inc, line 61
Code
function admin_menu_link_build($item) {
$item['module'] = 'admin_menu';
$item['menu_name'] = 'admin_menu';
$item += array(
'link_title' => isset($item['title']) ? $item['title'] : '',
'link_path' => isset($item['path']) ? $item['path'] : '',
'hidden' => 0,
'options' => array(),
);
$item['options']['alter'] = TRUE;
// DAM does not output item descriptions to prevent mouseover clashes and
// increase page loading performance. However, the following code shows how
// link attributes can be added (for ajaxified DAM functionality later).
/*
if (!empty($item['description'])) {
$item['options']['attributes']['title'] = $item['description'];
}
*/
if (!empty($item['query'])) {
$item['options']['query'] = $item['query'];
}
return $item;
}