View source
<?php
function total_control_dashboard_page_manager_tasks() {
return array(
'task type' => 'page',
'title' => t('Total Control Admin Dashboard'),
'description' => t('The total control task creates the administrative dashboard.'),
'admin title' => 'Total Control Admin Dashboard',
'admin description' => 'The total control task creates the administrative dashboard.',
'admin path' => 'admin/dashboard',
'task admin' => 'total_control_dashboard_task_admin',
'hook menu' => 'total_control_dashboard_menu',
'handler type' => 'context',
'get arguments' => 'total_control_dashboard_get_arguments',
'get context placeholders' => 'total_control_dashboard_get_contexts',
);
}
function total_control_dashboard_menu(&$items) {
$items['admin/dashboard'] = array(
'title' => 'Dashboard',
'description' => 'Administrative Dashboard',
'page callback' => 'total_control_dashboard',
'file path' => drupal_get_path('module', 'total_control') . '/plugins/tasks',
'file' => 'dashboard.inc',
'access arguments' => array(
'have total control',
),
'weight' => -50,
);
return $items;
}
function total_control_dashboard() {
$task = page_manager_get_task('dashboard');
ctools_include('context');
ctools_include('context-task-handler');
$contexts = ctools_context_handler_get_task_contexts($task, '', array());
$output = ctools_context_handler_render($task, '', $contexts, array());
return $output;
}
function total_control_dashboard_task_admin(&$form, &$form_state) {
}
function total_control_dashboard_get_arguments($task, $subtask_id) {
return array();
}
function total_control_dashboard_get_contexts($task, $subtask_id) {
return array();
}