You are here

function token_custom_menu in Custom Tokens 6

Same name and namespace in other branches
  1. 5 token_custom.module \token_custom_menu()
  2. 7.2 token_custom.module \token_custom_menu()
  3. 7 token_custom.module \token_custom_menu()

Implementation of hook_menu().

File

./token_custom.module, line 39
The Token Custom module.

Code

function token_custom_menu() {
  $items['admin/build/tokens'] = array(
    'title' => 'Tokens',
    'description' => 'Create custom tokens.',
    'page callback' => '_token_custom_page',
    'access arguments' => array(
      'create PHP code for execution by Token Custom',
    ),
    'type' => MENU_NORMAL_ITEM,
  );
  $items['admin/build/tokens/list'] = array(
    'title' => 'List',
    'description' => 'List of of custom tokens',
    'access arguments' => array(
      'create PHP code for execution by Token Custom',
    ),
    'type' => MENU_DEFAULT_LOCAL_TASK,
  );
  $items['admin/build/tokens/create'] = array(
    'title' => 'Create',
    'description' => 'Create custom tokens',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'token_custom_edit_form',
    ),
    'access arguments' => array(
      'create PHP code for execution by Token Custom',
    ),
    'weight' => 1,
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/build/tokens/help'] = array(
    'title' => 'Tokens',
    'description' => 'Token\'s list',
    'page callback' => 'theme',
    'page arguments' => array(
      'token_help',
    ),
    'access arguments' => array(
      'create PHP code for execution by Token Custom',
    ),
    'weight' => 2,
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/build/tokens/%token_custom/edit'] = array(
    'title' => 'Edit',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'token_custom_edit_form',
      3,
    ),
    'access arguments' => array(
      'create PHP code for execution by Token Custom',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['admin/build/tokens/%token_custom/delete'] = array(
    'title' => 'Delete',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'token_custom_delete_form',
      3,
    ),
    'access arguments' => array(
      'create PHP code for execution by Token Custom',
    ),
    'type' => MENU_CALLBACK,
  );
  return $items;
}