You are here

function devel_generate_menu in Devel 5

Same name and namespace in other branches
  1. 6 devel_generate.module \devel_generate_menu()
  2. 7 devel_generate/devel_generate.module \devel_generate_menu()

Implementation of hook_menu().

File

./devel_generate.module, line 6

Code

function devel_generate_menu($may_cache) {
  $items = array();
  if ($may_cache) {
    $items[] = array(
      'path' => 'admin/user/generate',
      'title' => t('Generate users'),
      'callback' => 'drupal_get_form',
      'description' => t('Generate a given number of users. Optionally delete current users.'),
      'callback arguments' => array(
        'devel_generate_users_form',
      ),
      'access' => user_access('administer users'),
      'type' => MENU_NORMAL_ITEM,
    );
    $items[] = array(
      'path' => 'admin/content/generate',
      'title' => t('Generate content'),
      'description' => t('Generate a given number of nodes and comments. Optionally delete current items.'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'devel_generate_content_form',
      ),
      'access' => user_access('administer nodes'),
      'type' => MENU_NORMAL_ITEM,
    );
    $items[] = array(
      'path' => 'admin/content/generate_taxonomy',
      'title' => t('Generate categories'),
      'description' => t('Generate a given number of vocabularies and terms. Optionally delete current categories.'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'devel_generate_taxonomy_form',
      ),
      'access' => user_access('administer nodes'),
      'type' => MENU_NORMAL_ITEM,
    );
  }
  return $items;
}