You are here

function shurly_menu in ShURLy 6

Same name and namespace in other branches
  1. 7 shurly.module \shurly_menu()

Implementation of hook_menu()

File

./shurly.module, line 29
description http://www.youtube.com/watch?v=Qo7qoonzTCE

Code

function shurly_menu() {

  // callback for creation of URLs
  $items = array();
  $items['shurly'] = array(
    'title' => 'Create URL',
    'description' => 'Create a short URL',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'shurly_create_form',
    ),
    'access arguments' => array(
      'Create short URLs',
    ),
  );
  $items['shurly/delete/%'] = array(
    'title' => 'Delete URL',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'shurly_confirm_delete_form',
      2,
    ),
    'access callback' => 'shurly_delete_access',
    'access arguments' => array(
      2,
    ),
    'type' => MENU_CALLBACK,
  );
  $items['admin/build/shurly/settings'] = array(
    'title' => 'Settings',
    'description' => t('Configure ShURLy.'),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'shurly_settings_form',
    ),
    'access arguments' => array(
      'Administer short URLs',
    ),
    'file' => 'shurly.admin.inc',
    'type' => MENU_CALLBACK,
  );
  return $items;
}