You are here

function gotwo_menu in Go - url redirects 7

Same name and namespace in other branches
  1. 5 gotwo.module \gotwo_menu()
  2. 6 gotwo.module \gotwo_menu()

Implements hook_menu().

File

./gotwo.module, line 39
Module that provides easy to use redirection links. A redirection link would be like: http://examples.org/go/a_label http://examples.org/go/123546 http://examples.org/go/or/like/this

Code

function gotwo_menu() {
  $items['go'] = array(
    'page callback' => '_gotwo_do_redir',
    'access callback' => TRUE,
    'type' => MENU_CALLBACK,
  );
  $items['admin/structure/gotwo'] = array(
    'title' => 'Go redirects',
    'description' => 'You can use the <go> tags just like the <a> for nicer urls.',
    'page callback' => '_gotwo_list',
    'access arguments' => array(
      'view gotwo redirects',
    ),
    'file' => 'gotwo.admin.inc',
  );
  $items['admin/structure/gotwo/list'] = array(
    'title' => 'List',
    'access arguments' => array(
      'view gotwo redirects',
    ),
    'file' => 'gotwo.admin.inc',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
  );
  $items['admin/structure/gotwo/add'] = array(
    'title' => 'Add redirect',
    'description' => 'Add a new Go redirect',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'gotwo_add_form',
    ),
    'access arguments' => array(
      'edit gotwo redirects',
    ),
    'file' => 'gotwo.admin.inc',
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/structure/gotwo/delete/%gotwo'] = array(
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'gotwo_delete_form',
      4,
    ),
    'access arguments' => array(
      'edit gotwo redirects',
    ),
    'file' => 'gotwo.admin.inc',
    'type' => MENU_CALLBACK,
  );
  $items['admin/structure/gotwo/reset/%gotwo'] = array(
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'gotwo_reset_form',
      4,
    ),
    'access arguments' => array(
      'edit gotwo redirects',
    ),
    'file' => 'gotwo.admin.inc',
    'type' => MENU_CALLBACK,
  );
  $items['admin/config/search/gotwo'] = array(
    'title' => 'Go settings',
    'description' => 'Configure URL parameters and disclaimer options.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'gotwo_admin_settings_form',
    ),
    'access arguments' => array(
      'administer gotwo',
    ),
    'file' => 'gotwo.admin.inc',
  );
  return $items;
}