You are here

function scheduler_menu in Scheduler 6

Same name and namespace in other branches
  1. 5 scheduler.module \scheduler_menu()
  2. 7 scheduler.module \scheduler_menu()

Implementation of hook_menu().

File

./scheduler.module, line 15

Code

function scheduler_menu() {
  $items = array();
  $items['scheduler/cron'] = array(
    'title' => 'Light weight cron handler',
    'description' => 'A light weight cron handler to allow more frequent runs of Schedulers internal cron system',
    'page callback' => '_scheduler_run_cron',
    'access callback' => TRUE,
    'type' => MENU_CALLBACK,
  );
  $items['scheduler/timecheck'] = array(
    'title' => 'Test your servers UTC clock',
    'description' => 'Allows site admin to check their servers internal clock',
    'page callback' => '_scheduler_timecheck',
    'access arguments' => array(
      'access administration pages',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['admin/settings/scheduler'] = array(
    'title' => 'Scheduler module settings',
    'description' => 'Allows site admins to configure scheduler.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'scheduler_admin',
    ),
    'access arguments' => array(
      'administer scheduler',
    ),
    'type' => MENU_NORMAL_ITEM,
  );
  $items['admin/settings/scheduler/default'] = array(
    'title' => 'Settings',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => 5,
  );
  $items['admin/content/node/scheduler'] = array(
    'type' => MENU_LOCAL_TASK,
    'title' => 'Scheduled',
    'page callback' => 'scheduler_list',
    'page arguments' => array(
      NULL,
      NULL,
    ),
    'access callback' => 'scheduler_list_access_callback',
    'access arguments' => array(
      NULL,
      NULL,
    ),
    'description' => 'Display a list of scheduled nodes',
    'file' => NULL,
  );
  $items['user/%/scheduler'] = array(
    'type' => MENU_LOCAL_TASK,
    'title' => 'Scheduled',
    'page callback' => 'scheduler_list',
    'page arguments' => array(
      'user_only',
      1,
    ),
    // This will pass the uid of the user account being viewed.
    'access callback' => 'scheduler_list_access_callback',
    'access arguments' => array(
      'user_only',
      1,
    ),
    'description' => 'Display a list of scheduled nodes',
    'file' => NULL,
  );
  $items['admin/settings/scheduler/cron'] = array(
    'title' => 'Lightweight Cron',
    'description' => 'A lightweight cron handler to allow more frequent runs of Schedulers internal cron system.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      '_scheduler_lightweight_cron',
    ),
    'access arguments' => array(
      'administer scheduler',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 10,
  );
  $items['admin/settings/scheduler/timecheck'] = array(
    'title' => 'Time Check',
    'description' => 'Allows site admin to check their servers internal clock',
    'page callback' => '_scheduler_timecheck',
    'access arguments' => array(
      'access administration pages',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 15,
  );
  return $items;
}