dashboard_admin
- Versions
- 7
dashboard_admin($launch_customize = FALSE)
Dashboard page callback.
Parameters
$launch_customize Whether to launch in customization mode right away. TRUE or FALSE.
Code
modules/dashboard/dashboard.module, line 197
<?php
function dashboard_admin($launch_customize = FALSE) {
$js_settings = array(
'dashboard' => array(
'drawer' => url('admin/dashboard/drawer'),
'blockContent' => url('admin/dashboard/block-content'),
'updatePath' => url('admin/dashboard/update'),
'formToken' => drupal_get_token('dashboard-update'),
'launchCustomize' => $launch_customize,
'dashboard' => url('admin/dashboard'),
'emptyBlockText' => _dashboard_get_default_string('dashboard_empty_block_text'),
'emptyRegionTextInactive' => _dashboard_get_default_string('dashboard_empty_region_text_inactive'),
'emptyRegionTextActive' => _dashboard_get_default_string('dashboard_empty_region_text_active'),
),
);
$build = array(
'#theme' => 'dashboard_admin',
'#message' => t('To customize the dashboard page, move blocks to the dashboard regions on !block-admin, or enable JavaScript on this page to use the drag-and-drop interface.', array('!block-admin' => l('the block administration page', 'admin/structure/block'))),
'#access' => user_access('administer blocks'),
'#attached' => array(
'js' => array(
drupal_get_path('module', 'dashboard') . '/dashboard.js',
array('data' => $js_settings, 'type' => 'setting'),
),
'library' => array(array('system', 'ui.sortable')),
),
);
return $build;
}
?>Login or register to post comments 