You are here

function workbench_access_menu in Workbench Access 7

Implements hook_menu().

7 string references to 'workbench_access_menu'
hook_workbench_access_info in ./workbench_access.api.php
Defines your implementation for Workbench Access.
menu_workbench_access_configuration in modules/menu.workbench_access.inc
Defines configuration options for the default access scheme.
menu_workbench_access_info in modules/menu.workbench_access.inc
Implements hook_workbench_access_info().
WorkbenchAccessMenuTestCase::testWorkbenchAccessMenu in tests/workbench_access.test
workbench_access_form_menu_edit_item_alter in ./workbench_access.module
Implements hook_form_alter().

... See full list

File

./workbench_access.module, line 21
Workbench Access module file.

Code

function workbench_access_menu() {
  $items['workbench_access/autocomplete/%/%'] = array(
    'page callback' => 'workbench_access_autocomplete',
    'page arguments' => array(
      2,
      3,
    ),
    'access arguments' => array(
      'assign workbench access',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'workbench_access.pages.inc',
  );
  if (!variable_get('workbench_access_custom_form', 1) || variable_get('workbench_access') != 'taxonomy') {
    $items['workbench_access/taxonomy_autocomplete'] = array(
      'title' => 'Autocomplete taxonomy',
      'page callback' => 'workbench_access_taxonomy_autocomplete',
      'access arguments' => array(
        'access content',
      ),
      'type' => MENU_CALLBACK,
      'file' => 'taxonomy.workbench_access.inc',
      'file path' => drupal_get_path('module', 'workbench_access') . '/modules',
    );
  }
  $items['admin/config/workbench/access'] = array(
    'title' => 'Workbench Access',
    'description' => 'Workbench access control settings',
    'page callback' => 'workbench_access_editors',
    'access arguments' => array(
      'assign workbench access',
    ),
    'file' => 'workbench_access.admin.inc',
  );
  $items['admin/config/workbench/access/editors'] = array(
    'title' => 'Editors',
    'description' => 'The editor assignment settings.',
    'page callback' => 'workbench_access_editors',
    'access arguments' => array(
      'assign workbench access',
    ),
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
    'file' => 'workbench_access.admin.inc',
  );
  $items['admin/config/workbench/access/roles'] = array(
    'title' => 'Roles',
    'description' => 'Role settings.',
    'page callback' => 'workbench_access_roles',
    'access arguments' => array(
      'assign workbench access',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => -8,
    'file' => 'workbench_access.admin.inc',
  );
  $items['admin/config/workbench/access/sections'] = array(
    'title' => 'Sections',
    'description' => 'Define content sections for the Workbench Access module.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'workbench_access_section_form',
    ),
    'access arguments' => array(
      'administer workbench access',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => -5,
    'file' => 'workbench_access.admin.inc',
  );
  $items['admin/config/workbench/access/settings'] = array(
    'title' => 'Settings',
    'description' => 'Settings for the Workbench Access module.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'workbench_access_settings_form',
    ),
    'access arguments' => array(
      'administer workbench access',
    ),
    'type' => MENU_LOCAL_TASK,
    'file' => 'workbench_access.admin.inc',
  );
  $items['admin/config/workbench/access/install'] = array(
    'title' => 'Install',
    'description' => 'Installs a test vocabulary for the Workbench Access module.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'workbench_access_install_form',
      'admin/config/workbench/access/settings',
    ),
    'access arguments' => array(
      'administer workbench access',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'workbench_access.admin.inc',
  );
  $items['admin/workbench/sections'] = array(
    'title' => 'My sections',
    'page callback' => 'workbench_access_sections',
    'access arguments' => array(
      'access workbench',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 5,
    'file' => 'workbench_access.admin.inc',
  );
  $items['user/%user/sections'] = array(
    'title' => 'Sections',
    'description' => 'Assign users to sections for the Workbench Access module.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'workbench_access_user_form',
      1,
    ),
    'access callback' => 'workbench_access_assign_user',
    'access arguments' => array(
      1,
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 1,
    'file' => 'workbench_access.admin.inc',
  );

  // Provide a content tab if not using workbench.
  if (!module_exists('workbench') && module_exists('views')) {
    $items['user/%user/workbench_access'] = array(
      'title' => 'Content',
      'access arguments' => array(
        1,
      ),
      'access callback' => 'workbench_access_views_access',
      'page callback' => 'views_embed_view',
      'page arguments' => array(
        'workbench_access_content',
        'default',
      ),
      'description' => 'View content assigned to my sections.',
      'type' => MENU_LOCAL_TASK,
      'weight' => 2,
    );
  }
  return $items;
}