You are here

function pmpapi_query_tools_menu in Public Media Platform API Integration 7

Implements hook_menu().

File

pmpapi_query_tools/pmpapi_query_tools.module, line 23
Allows admins to build, save, and execute PMP queries

Code

function pmpapi_query_tools_menu() {
  $items = array();
  $items['admin/config/services/pmp/queries'] = array(
    'title' => 'Queries',
    'description' => 'Save, edit and delete PMP queries.',
    'access arguments' => array(
      'administer PMP queries',
    ),
    'page callback' => 'pmpapi_query_tools_list_queries',
    'file' => 'pmpapi_query_tools.admin.inc',
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/config/services/pmp/queries/add'] = array(
    'title' => 'Add query',
    'description' => 'Add a PMP query.',
    'access arguments' => array(
      'administer PMP queries',
    ),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'pmpapi_query_tools_admin_config',
    ),
    'file' => 'pmpapi_query_tools.admin.inc',
    'type' => MENU_LOCAL_ACTION,
  );
  $items['admin/config/services/pmp/queries/edit/%'] = array(
    'title' => 'Edit query',
    'description' => 'Edit a PMP query.',
    'access arguments' => array(
      'administer PMP queries',
    ),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'pmpapi_query_tools_admin_config',
      6,
    ),
    'file' => 'pmpapi_query_tools.admin.inc',
  );
  $items['admin/config/services/pmp/queries/delete/%'] = array(
    'title' => 'Delete query',
    'description' => 'Delete a PMP query.',
    'access arguments' => array(
      'administer PMP queries',
    ),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'pmpapi_query_tools_remove_query_form',
      6,
    ),
    'file' => 'pmpapi_query_tools.admin.inc',
  );
  return $items;
}