You are here

function agenda_menu in Agenda 7.2

Same name and namespace in other branches
  1. 6.2 agenda.module \agenda_menu()
  2. 6 agenda.module \agenda_menu()
  3. 7 agenda.module \agenda_menu()

Implements hook_menu().

File

./agenda.module, line 11

Code

function agenda_menu() {
  $items = array();
  $items['admin/config/services/agenda'] = array(
    'title' => 'Agenda',
    'type' => MENU_NORMAL_ITEM,
    'description' => 'Create and configure agenda blocks which utilise Google Calendar\'s web service.',
    'page callback' => 'agenda_admin',
    'page arguments' => array(
      'agenda_admin',
    ),
    'access arguments' => array(
      'configure agenda blocks',
    ),
    'file' => 'agenda.admin.php',
  );
  $items['admin/config/services/agenda/list'] = array(
    'title' => 'List',
    'type' => MENU_DEFAULT_LOCAL_TASK,
  );
  $items['admin/config/services/agenda/googleapi'] = array(
    'title' => 'Settings',
    'description' => 'Set Google API Key',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'agenda_admin_googleapi',
    ),
    'access arguments' => array(
      'configure agenda blocks',
    ),
    'type' => MENU_LOCAL_TASK,
    'file' => 'agenda.admin.php',
  );
  $items['admin/config/services/agenda/0/configure'] = array(
    'title' => 'Add new block',
    'type' => MENU_LOCAL_ACTION,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'agenda_admin_configure',
      4,
    ),
    'access arguments' => array(
      'configure agenda blocks',
    ),
    'file' => 'agenda.admin.php',
  );
  $items['admin/config/services/agenda/%/configure'] = array(
    'title' => 'Configure agenda block settings',
    'type' => MENU_LOCAL_ACTION,
    'context' => MENU_CONTEXT_INLINE,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'agenda_admin_configure',
      4,
    ),
    'access arguments' => array(
      'configure agenda blocks',
    ),
    'file' => 'agenda.admin.php',
    'weight' => -4,
  );
  $items['admin/config/services/agenda/%/delete'] = array(
    'title' => 'Delete agenda block',
    'type' => MENU_CALLBACK,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'agenda_admin_delete',
      4,
    ),
    'access arguments' => array(
      'configure agenda blocks',
    ),
    'file' => 'agenda.admin.php',
    'weight' => -3,
  );
  $items['admin/config/services/agenda/%/debug'] = array(
    'title' => 'Debug agenda block',
    'type' => MENU_LOCAL_ACTION,
    'context' => MENU_CONTEXT_INLINE,
    'page callback' => 'agenda_debug',
    'page arguments' => array(
      4,
    ),
    'access arguments' => array(
      'configure agenda blocks',
    ),
    'file' => 'agenda.admin.php',
    'weight' => -2,
  );
  $items['admin/config/services/agenda/%/clear'] = array(
    'title' => 'Clear agenda block cache',
    'type' => MENU_LOCAL_ACTION,
    'context' => MENU_CONTEXT_INLINE,
    'page callback' => 'agenda_clear',
    'page arguments' => array(
      4,
    ),
    'access arguments' => array(
      'configure agenda blocks',
    ),
    'file' => 'agenda.admin.php',
    'weight' => -1,
  );
  return $items;
}