function formdefaults_menu in Form Defaults 5.2
Same name and namespace in other branches
- 5.3 formdefaults.module \formdefaults_menu()
- 5 formdefaults.module \formdefaults_menu()
- 6.2 formdefaults.module \formdefaults_menu()
- 6 formdefaults.module \formdefaults_menu()
- 7 formdefaults.module \formdefaults_menu()
Implements hook_menu.
File
- ./
formdefaults.module, line 27
Code
function formdefaults_menu($may_cache) {
global $user;
$items = array();
if ($may_cache) {
$items[] = array(
'path' => 'formdefaults',
'title' => t('Edit Form'),
'description' => t('Edit a form'),
'callback' => 'drupal_get_form',
'callback arguments' => array(
'formdefaults_edit',
),
'access' => user_access('change form labels'),
'type' => MENU_CALLBACK,
);
$items[] = array(
'path' => 'admin/build/formdefaults',
'title' => t('Form Labels and Text'),
'callback' => 'drupal_get_form',
'callback arguments' => array(
'formdefaults_enable',
),
'description' => t('Turns on or off the editing controls to allow editing form labels and descriptions'),
'access' => user_access('change form labels'),
'type' => MENU_NORMAL_ITEM,
);
$items[] = array(
'path' => 'admin/build/formdefaults/control',
'title' => 'Control',
'callback' => 'formdefaults_admin',
'callback arguments' => array(
'enable',
),
'access' => user_access('change form labels'),
'type' => MENU_DEFAULT_LOCAL_TASK,
);
$items[] = array(
'path' => 'admin/build/formdefaults/manage',
'title' => 'Manage',
'callback' => 'formdefaults_admin',
'callback arguments' => array(
'manage',
),
'access' => user_access('change form labels'),
'type' => MENU_LOCAL_TASK,
);
$items[] = array(
'path' => 'admin/build/formdefaults/import',
'title' => 'Import',
'callback' => 'formdefaults_admin',
'callback arguments' => array(
'import',
),
'access' => user_access('change form labels'),
'type' => MENU_LOCAL_TASK,
'weight' => 1,
);
$items[] = array(
'path' => 'admin/build/formdefaults/export',
'title' => 'Export',
'callback' => 'formdefaults_admin',
'callback arguments' => array(
'export',
),
'access' => user_access('change form labels'),
'type' => MENU_LOCAL_TASK,
'weight' => 1,
);
}
return $items;
}