function ultimate_cron_menu in Ultimate Cron 6
Same name and namespace in other branches
- 8 ultimate_cron.module \ultimate_cron_menu()
- 7.2 ultimate_cron.module \ultimate_cron_menu()
- 7 ultimate_cron.module \ultimate_cron_menu()
Implementation of 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/settings/cron'] = array(
'title' => 'Cron',
'description' => 'View and manage cron table',
'page callback' => 'ultimate_cron_view_page',
'access arguments' => array(
'administer ultimate cron',
),
'module' => 'ultimate_cron',
'file' => 'ultimate_cron.admin.inc',
);
$items['admin/settings/cron/overview'] = array(
'title' => 'List',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -10,
);
$items['admin/settings/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/settings/cron/settings/%'] = array(
'title' => 'Settings',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'ultimate_cron_function_settings_form',
4,
),
'access arguments' => array(
'administer ultimate cron',
),
'weight' => 0,
'file' => 'ultimate_cron.admin.inc',
);
$items['admin/settings/cron/import'] = array(
'title' => 'Import',
'description' => 'Import configuration',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'ultimate_cron_import_form',
),
'access callback' => 'ultimate_cron_import_form_access',
'weight' => 0,
'type' => MENU_LOCAL_TASK,
'file' => 'ultimate_cron.admin.inc',
);
$weight = 0;
foreach (array(
'error' => 'Errors',
'warning' => 'Warnings',
'info' => 'Info',
'success' => 'Success',
'running' => 'Running',
) as $status => $title) {
$items['admin/settings/cron/overview/' . $status] = array(
'title' => $title,
'description' => 'View and manage cron table',
'page callback' => 'ultimate_cron_view_page',
'page arguments' => array(
4,
),
'access arguments' => array(
'administer ultimate cron',
),
'module' => 'ultimate_cron',
'file' => 'ultimate_cron.admin.inc',
'weight' => $weight++,
'type' => MENU_LOCAL_TASK,
);
}
$items['admin/settings/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',
);
return $items;
}