function dashboard_admin
dashboard_admin($launch_customize = FALSE)
Page callback: Displays the dashboard.
Parameters
$launch_customize: Whether to launch in customization mode right away. TRUE or FALSE.
File
- modules/dashboard/dashboard.module, line 275
- Provides a dashboard page in the administrative interface.
Code
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' => t('(empty)'), 'emptyRegionTextInactive' => t('This dashboard region is empty. Click <em>Customize dashboard</em> to add blocks to it.'), 'emptyRegionTextActive' => t('DRAG HERE'), ), ); $build = array( '#theme' => 'dashboard_admin', '#message' => t('To customize the dashboard page, move blocks to the dashboard regions on the <a href="@dashboard">Dashboard administration page</a>, or enable JavaScript on this page to use the drag-and-drop interface.', array('@dashboard' => url('admin/dashboard/configure'))), '#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; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!dashboard!dashboard.module/function/dashboard_admin/7.x