function devel_menu in Devel 6
Same name and namespace in other branches
- 5 devel.module \devel_menu()
- 7 devel.module \devel_menu()
Implementation of hook_menu().
File
- ./
devel.module, line 36
Code
function devel_menu() {
$items = array();
// note: we can't dynamically append destination to querystring. do so at theme layer. fix in D7?
$items['devel/cache/clear'] = array(
'title' => 'Empty cache',
'page callback' => 'devel_cache_clear',
'description' => 'Clear the CSS cache and all database cache tables which store page, node, theme and variable caches.',
'access arguments' => array(
'access devel information',
),
'menu_name' => 'devel',
);
$items['devel/queries'] = array(
'title' => 'Database queries',
'page callback' => 'devel_queries',
'access callback' => 'devel_menu_access_store_queries',
'access arguments' => array(),
'menu_name' => 'devel',
);
$items['devel/queries/empty'] = array(
'title' => 'Empty database queries',
'page callback' => 'devel_queries_empty',
'access callback' => 'devel_menu_access_store_queries',
'access arguments' => array(),
'menu_name' => 'devel',
);
$items['devel/reference'] = array(
'title' => 'Function reference',
'description' => 'View a list of currently defined user functions with documentation links.',
'page callback' => 'devel_function_reference',
'access arguments' => array(
'access devel information',
),
'menu_name' => 'devel',
);
$items['devel/reinstall'] = array(
'title' => 'Reinstall modules',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'devel_reinstall',
),
'description' => 'Run hook_uninstall() and then hook_install() for a given module.',
'access arguments' => array(
'access devel information',
),
'menu_name' => 'devel',
);
$items['devel/menu/reset'] = array(
'title' => 'Rebuild menus',
'description' => 'Rebuild menu based on hook_menu() and revert any custom changes. All menu items return to their default settings.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'devel_menu_rebuild',
),
'access arguments' => array(
'access devel information',
),
'menu_name' => 'devel',
);
$items['devel/variable'] = array(
'title' => 'Variable editor',
'description' => 'Edit and delete site variables.',
'page callback' => 'devel_variable_page',
'access arguments' => array(
'access devel information',
),
'menu_name' => 'devel',
);
// we don't want the abbreviated version provided by status report
$items['devel/phpinfo'] = array(
'title' => 'PHPinfo()',
'description' => 'View your server\'s PHP configuration',
'page callback' => 'devel_phpinfo',
'access arguments' => array(
'access devel information',
),
'menu_name' => 'devel',
);
$items['devel/php'] = array(
'title' => 'Execute PHP Code',
'description' => 'Execute some PHP code',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'devel_execute_form',
),
'access arguments' => array(
'execute php code',
),
'menu_name' => 'devel',
);
$items['devel/elements'] = array(
'title' => 'Hook_elements()',
'description' => 'View the active form/render elements for this site.',
'page callback' => 'devel_elements_page',
'access arguments' => array(
'access devel information',
),
'menu_name' => 'devel',
);
$items['devel/variable/edit/%'] = array(
'title' => 'Variable editor',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'devel_variable_edit',
3,
),
'access arguments' => array(
'access devel information',
),
'type' => MENU_CALLBACK,
'menu_name' => 'devel',
);
$items['devel/session'] = array(
'title' => 'Session viewer',
'description' => 'List the contents of $_SESSION.',
'page callback' => 'devel_session',
'access arguments' => array(
'access devel information',
),
'menu_name' => 'devel',
);
$items['devel/switch'] = array(
'title' => 'Switch user',
'page callback' => 'devel_switch_user',
'access callback' => '_devel_switch_user_access',
'access arguments' => array(
2,
),
'type' => MENU_CALLBACK,
'menu_name' => 'devel',
);
$items['admin/settings/devel'] = array(
'title' => 'Devel settings',
'description' => 'Helper functions, pages, and blocks to assist Drupal developers. The devel blocks can be managed via the <a href="/admin/build/block">block administration</a> page.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'devel_admin_settings',
),
'access arguments' => array(
'administer site configuration',
),
'menu_name' => 'devel',
);
$items['node/%node/devel'] = array(
'title' => 'Devel',
'page callback' => 'devel_load_object',
'page arguments' => array(
1,
'node',
),
'access callback' => 'user_access',
'access arguments' => array(
'access devel information',
),
'type' => MENU_LOCAL_TASK,
'weight' => 100,
);
$items['node/%node/devel/load'] = array(
'title' => 'Dev load',
'page callback' => 'devel_load_object',
'page arguments' => array(
1,
'node',
),
'access callback' => 'user_access',
'access arguments' => array(
'access devel information',
),
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => 0,
);
$items['node/%node/devel/render'] = array(
'title' => 'Dev render',
'page callback' => 'devel_render_object',
'page arguments' => array(
'node',
1,
),
'access callback' => 'user_access',
'access arguments' => array(
'access devel information',
),
'type' => MENU_LOCAL_TASK,
'weight' => 10,
);
$items['user/%user/devel'] = array(
'title' => 'Devel',
'page callback' => 'devel_load_object',
'page arguments' => array(
1,
'user',
),
'access callback' => 'user_access',
'access arguments' => array(
'access devel information',
),
'type' => MENU_LOCAL_TASK,
'weight' => 100,
);
$items['user/%user/devel/load'] = array(
'title' => 'Dev load',
'page callback' => 'devel_load_object',
'page arguments' => array(
1,
'user',
),
'access callback' => 'user_access',
'access arguments' => array(
'access devel information',
),
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => 0,
);
$items['user/%user/devel/render'] = array(
'title' => 'Dev render',
'page callback' => 'devel_render_object',
'page arguments' => array(
'user',
1,
),
'access callback' => 'user_access',
'access arguments' => array(
'access devel information',
),
'type' => MENU_LOCAL_TASK,
'weight' => 10,
);
$items['devel/theme/registry'] = array(
'title' => 'Theme registry',
'description' => 'View a list of available theme functions across the whole site.',
'page callback' => 'devel_theme_registry',
'access arguments' => array(
'access devel information',
),
'menu_name' => 'devel',
);
return $items;
}