You are here

function alinks_menu in Alinks 7

Same name and namespace in other branches
  1. 6 alinks.module \alinks_menu()

Implementation of hook_menu().

File

./alinks.module, line 36
this module allows users to associates defined text to links

Code

function alinks_menu() {
  $items = array();
  $admin = array(
    'administer site configuration',
  );
  $editor = array(
    'edit alinks',
  );
  $items['admin/config/content/alinks'] = array(
    'title' => t('Alinks'),
    'description' => t('Set the preferences for Alinks module.'),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'alinks_admin_settings',
    ),
    'access arguments' => $admin,
  );
  $items['admin/structure/alinks'] = array(
    'title' => t('Alinks'),
    'description' => t('Define & edit alinks'),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'alinks_add_form',
    ),
    'access arguments' => $editor,
    'type' => MENU_NORMAL_ITEM,
  );
  $items['admin/structure/alinks/add'] = array(
    'title' => t('Add Alink'),
    'description' => t('Add alink'),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'alinks_add_form',
    ),
    'access arguments' => $editor,
    'type' => MENU_DEFAULT_LOCAL_TASK,
  );
  $items['admin/structure/alinks/edit'] = array(
    'title' => t('Edit Alinks'),
    'description' => t('Edit alinks'),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'alinks_edit_form',
    ),
    'access arguments' => $editor,
    'type' => MENU_LOCAL_TASK,
  );
  return $items;
}