function token_custom_menu in Custom Tokens 7.2
Same name and namespace in other branches
- 5 token_custom.module \token_custom_menu()
- 6 token_custom.module \token_custom_menu()
- 7 token_custom.module \token_custom_menu()
Implements of hook_menu().
File
- ./
token_custom.module, line 56 - It gives the user the ability to create custom tokens using PHP code for specific replacements that can improve other modules relying on the token Drupal 7 core API.
Code
function token_custom_menu() {
$items['admin/structure/token-custom'] = array(
'title' => 'Custom tokens',
'description' => 'Administrate custom tokens.',
'page callback' => 'token_custom_list_page',
'access arguments' => array(
'list custom tokens',
),
'file' => 'token_custom.admin.inc',
);
$items['admin/structure/token-custom/list'] = array(
'title' => 'Custom tokens',
'description' => 'List of custom tokens.',
'type' => MENU_DEFAULT_LOCAL_TASK,
);
$items['admin/structure/token-custom/add'] = array(
'title' => 'Add token',
'description' => 'Create custom tokens',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'token_custom_edit_form',
'add',
),
'access arguments' => array(
'administer custom tokens',
),
'file' => 'token_custom.admin.inc',
'weight' => 1,
'type' => MENU_LOCAL_ACTION,
);
$items['admin/structure/token-custom/%token_custom/edit'] = array(
'title' => 'Edit token',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'token_custom_edit_form',
'edit',
3,
),
'access arguments' => array(
'administer custom tokens',
),
'file' => 'token_custom.admin.inc',
'type' => MENU_CALLBACK,
'weight' => 10,
);
$items['admin/structure/token-custom/%token_custom/delete'] = array(
'title' => 'Delete custom token',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'token_custom_delete_confirm_form',
3,
),
'access arguments' => array(
'administer custom tokens',
),
'file' => 'token_custom.admin.inc',
);
$items['admin/structure/token-custom/type'] = array(
'title' => 'Custom token types',
'description' => 'View custom token types',
'page callback' => 'token_custom_type_list_page',
'access arguments' => array(
'administer custom tokens',
),
'file' => 'token_custom.admin.inc',
'weight' => 2,
'type' => MENU_LOCAL_TASK,
);
$items['admin/structure/token-custom/type/add'] = array(
'title' => 'Add token type',
'description' => 'Create custom token types',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'token_custom_type_edit_form',
'add',
),
'access arguments' => array(
'administer custom tokens',
),
'file' => 'token_custom.admin.inc',
'weight' => 2,
'type' => MENU_LOCAL_ACTION,
);
$items['admin/structure/token-custom/type/%token_custom_type/edit'] = array(
'title' => 'Edit token type',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'token_custom_type_edit_form',
'edit',
4,
),
'access callback' => 'token_custom_type_forms_access',
'access arguments' => array(
4,
),
'file' => 'token_custom.admin.inc',
'type' => MENU_CALLBACK,
);
$items['admin/structure/token-custom/type/%token_custom_type/delete'] = array(
'title' => 'Delete custom token',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'token_custom_type_delete_confirm_form',
4,
),
'access callback' => 'token_custom_type_forms_access',
'access arguments' => array(
4,
),
'file' => 'token_custom.admin.inc',
);
return $items;
}