1 dashboard.module | dashboard_menu() |
Implements hook_menu().
File
- core/
modules/ dashboard/ dashboard.module, line 10 - Provides an administrative dashboard.
Code
function dashboard_menu() {
$items = array();
// Check if any dashboard is present and is not disabled.
$dashboard_layouts = layout_load_multiple_by_path('admin/dashboard');
$dashboard_layout = array_pop($dashboard_layouts);
if ($dashboard_layout->hasContexts(array('dashboard')) && !$dashboard_layout->disabled) {
$items['admin/dashboard/overview'] = array(
'title' => 'Overview',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -100,
);
$items['admin/dashboard/settings'] = array(
'title' => 'Settings',
'page callback' => 'backdrop_get_form',
'page arguments' => array('dashboard_admin_settings'),
'description' => 'Admin dashboard settings',
'access arguments' => array('administer dashboard'),
'type' => MENU_LOCAL_TASK,
'weight' => -10,
);
}
return $items;
}