function devel_generate_menu
Same name in other branches
- 7.x-1.x devel_generate/devel_generate.module \devel_generate_menu()
Implementation of hook_menu().
File
-
./
devel_generate.module, line 8
Code
function devel_generate_menu() {
$items = array();
// Admin user pages
$items['admin/generate'] = array(
'title' => 'Generate items',
'description' => 'Populate your database with dummy items.',
'position' => 'left',
'page callback' => 'system_admin_menu_block_page',
'access arguments' => array(
'administer site configuration',
),
'file' => 'system.admin.inc',
'file path' => drupal_get_path('module', 'system'),
);
$items['admin/generate/user'] = array(
'title' => 'Generate users',
'description' => 'Generate a given number of users. Optionally delete current users.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'devel_generate_users_form',
),
'access arguments' => array(
'administer users',
),
);
$items['admin/generate/content'] = array(
'title' => 'Generate content',
'description' => 'Generate a given number of nodes and comments. Optionally delete current items.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'devel_generate_content_form',
),
'access arguments' => array(
'administer nodes',
),
);
if (module_exists('taxonomy')) {
$items['admin/generate/taxonomy'] = array(
'title' => 'Generate categories',
'description' => 'Generate a given number of vocabularies and terms. Optionally delete current categories.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'devel_generate_taxonomy_form',
),
'access arguments' => array(
'administer nodes',
),
);
}
return $items;
}