function ultimate_cron_menu in Ultimate Cron 8
Same name and namespace in other branches
- 6 ultimate_cron.module \ultimate_cron_menu()
- 7.2 ultimate_cron.module \ultimate_cron_menu()
- 7 ultimate_cron.module \ultimate_cron_menu()
Implements hook_menu().
File
- ./
ultimate_cron.module, line 121 - @todo Add filter on overview page. @todo Add log view (with graph). @todo Make proper markup for overview page. @todo Refactor drush stuff, too many intimate relations with Background Process @todo Refactor Cron % offset stuff. Too mixed up and…
Code
function ultimate_cron_menu() {
$items = array();
$items['admin/config/system/cron/settings'] = array(
'title' => 'Settings',
'description' => 'Cron settings',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'ultimate_cron_settings_form',
),
'access arguments' => array(
'administer ultimate cron',
),
'type' => MENU_LOCAL_TASK,
'file' => 'ultimate_cron.admin.inc',
);
$items['admin/config/system/cron/settings/%'] = array(
'title' => 'Settings',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'ultimate_cron_function_settings_form',
5,
),
'access arguments' => array(
'administer ultimate cron',
),
'weight' => 0,
'file' => 'ultimate_cron.admin.inc',
);
$weight = 0;
foreach (array(
'error' => 'Errors',
'warning' => 'Warnings',
'info' => 'Info',
'success' => 'Success',
'running' => 'Running',
) as $status => $title) {
$items['admin/config/system/cron/overview/' . $status] = array(
'title' => $title,
'description' => 'View and manage cron table',
'page callback' => 'ultimate_cron_view_page',
'page arguments' => array(
5,
),
'access arguments' => array(
'administer ultimate cron',
),
'module' => 'ultimate_cron',
'file' => 'ultimate_cron.admin.inc',
'weight' => $weight++,
'type' => MENU_LOCAL_TASK,
);
}
$items['admin/config/system/cron/overview/all'] = array(
'title' => 'All',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => $weight++,
);
$items['admin/reports/cron'] = array(
'title' => 'Cron logs',
'description' => 'View logs for all cron jobs.',
'page callback' => 'ultimate_cron_view_page',
'access arguments' => array(
'administer ultimate cron',
),
'file' => 'ultimate_cron.admin.inc',
);
$items['admin/reports/cron/%'] = array(
'title' => 'Cron log',
'description' => 'View log for specific function.',
'page callback' => 'ultimate_cron_function_log_page',
'page arguments' => array(
3,
),
'access arguments' => array(
'administer ultimate cron',
),
'file' => 'ultimate_cron.admin.inc',
);
$items['admin/ultimate-cron/service/start/%'] = array(
'type' => MENU_CALLBACK,
'title' => 'Run cron job',
'description' => 'Run cron job',
'page callback' => 'ultimate_cron_service_start',
'page arguments' => array(
4,
),
'access arguments' => array(
'administer ultimate cron',
),
'file' => 'ultimate_cron.admin.inc',
);
$items['admin/ultimate-cron/service/enable/%'] = array(
'type' => MENU_CALLBACK,
'title' => 'Enable cron job',
'description' => 'Enable cron job',
'page callback' => 'ultimate_cron_service_enable',
'page arguments' => array(
4,
TRUE,
),
'access arguments' => array(
'administer ultimate cron',
),
'file' => 'ultimate_cron.admin.inc',
);
$items['admin/ultimate-cron/service/disable/%'] = array(
'type' => MENU_CALLBACK,
'title' => 'Disable cron job',
'description' => 'Disable cron job',
'page callback' => 'ultimate_cron_service_enable',
'page arguments' => array(
4,
FALSE,
),
'access arguments' => array(
'administer ultimate cron',
),
'file' => 'ultimate_cron.admin.inc',
);
$items['admin/ultimate-cron/service/process-status'] = array(
'type' => MENU_CALLBACK,
'title' => 'Cron job process status',
'description' => 'Cron job process status',
'page callback' => 'ultimate_cron_service_process_status',
'access arguments' => array(
'administer ultimate cron',
),
'file' => 'ultimate_cron.admin.inc',
);
return $items;
}