You are here

function votingapi_menu in Voting API 6.2

Same name and namespace in other branches
  1. 5 votingapi.module \votingapi_menu()
  2. 6 votingapi.module \votingapi_menu()
  3. 7.3 votingapi.module \votingapi_menu()
  4. 7.2 votingapi.module \votingapi_menu()

Implementation of hook_menu().

File

./votingapi.module, line 16
A generalized voting API for Drupal.

Code

function votingapi_menu() {
  $items = array();
  $items['admin/settings/votingapi'] = array(
    'title' => 'Voting API',
    'description' => 'Global settings for the Voting API.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'votingapi_settings_form',
    ),
    'access callback' => 'user_access',
    'access arguments' => array(
      'administer voting api',
    ),
    'file' => 'votingapi.admin.inc',
    'type' => MENU_NORMAL_ITEM,
  );
  if (module_exists('devel_generate')) {
    $items['admin/generate/votingapi'] = array(
      'title' => 'Generate votes',
      'description' => 'Generate a given number of votes on site content. Optionally delete existing votes.',
      'page callback' => 'drupal_get_form',
      'page arguments' => array(
        'votingapi_generate_votes_form',
      ),
      'access arguments' => array(
        'administer voting api',
      ),
      'file' => 'votingapi.admin.inc',
    );
  }
  return $items;
}