You are here

function votingapi_actions_menu in Voting API 5

File

./votingapi_actions.module, line 17

Code

function votingapi_actions_menu($may_cache) {
  $items = array();
  require_once drupal_get_path('module', 'votingapi_actions') . '/votingapi_actions.inc';
  require_once drupal_get_path('module', 'votingapi_actions') . '/votingapi_actions_ui.inc';
  if ($may_cache) {
    $items[] = array(
      'path' => 'admin/settings/voting_actions',
      'title' => t('Voting actions'),
      'description' => t('Vote-driven triggers and actions for your site'),
      'callback' => 'votingapi_actions_admin_page',
      'access' => user_access('administer voting actions'),
      'type' => MENU_NORMAL_ITEM,
    );
    $items[] = array(
      'path' => 'admin/settings/voting_actions/list',
      'title' => t('List'),
      'callback' => 'votingapi_actions_admin_page',
      'access' => user_access('administer voting actions'),
      'type' => MENU_DEFAULT_LOCAL_TASK,
      'weight' => '-1',
    );
    $items[] = array(
      'path' => 'admin/settings/voting_actions/add',
      'title' => t('Add'),
      'callback' => 'votingapi_actions_admin_edit_page',
      'access' => user_access('administer voting actions'),
      'type' => MENU_LOCAL_TASK,
    );
    $items[] = array(
      'path' => 'admin/settings/voting_actions/edit',
      'title' => t('Edit action set'),
      'callback' => 'votingapi_actions_admin_edit_page',
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'admin/settings/voting_actions/import',
      'title' => t('Import'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'votingapi_actions_admin_import_page',
      ),
      'access' => user_access('administer voting actions'),
      'type' => MENU_LOCAL_TASK,
    );
    $items[] = array(
      'path' => 'admin/settings/voting_actions/export',
      'title' => t('Export action set'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'votingapi_actions_admin_export_page',
      ),
      'access' => user_access('administer voting actions'),
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'admin/settings/voting_actions/delete',
      'title' => t('Edit action set'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'votingapi_actions_admin_delete_page',
      ),
      'access' => user_access('administer voting actions'),
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'admin/settings/voting_actions/enable',
      'callback' => 'votingapi_actions_admin_enable_page',
      'access' => user_access('administer voting actions'),
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'admin/settings/voting_actions/disable',
      'callback' => 'votingapi_actions_admin_disable_page',
      'access' => user_access('administer voting actions'),
      'type' => MENU_CALLBACK,
    );
  }
  return $items;
}