You are here

function simple_access_menu in Simple Access 7.2

Same name and namespace in other branches
  1. 5.2 simple_access.module \simple_access_menu()
  2. 5 simple_access.module \simple_access_menu()
  3. 6.2 simple_access.module \simple_access_menu()

Implements hook_menu().

File

./simple_access.module, line 17
This module allows administrators to make nodes viewable by specific 'access groups'. Each access group can contain any number of roles. If a node is not assigned to any access groups, it will remain viewable by all users.

Code

function simple_access_menu() {
  $items['admin/config/content/simple-access'] = array(
    'title' => 'Simple Access',
    'description' => 'Configure node access',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'simple_access_settings_page',
    ),
    'access callback' => 'user_access',
    'access arguments' => array(
      'manage simple access',
    ),
    'file' => 'simple_access.admin.inc',
    'type' => MENU_NORMAL_ITEM,
  );
  $items['admin/config/content/simple-access/settings'] = array(
    'title' => 'Settings',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'simple_access_settings_page',
    ),
    'access callback' => 'user_access',
    'access arguments' => array(
      'manage simple access',
    ),
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'description' => 'Configure which kinds of access (view, edit, delete) users with permission to use Simple Access can define for each node.',
    'file' => 'simple_access.admin.inc',
    'weight' => -1,
  );
  $items['admin/config/content/simple-access/groups'] = array(
    'title' => 'Groups',
    'access callback' => 'user_access',
    'access arguments' => array(
      'manage simple access',
    ),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'simple_access_page_overview',
    ),
    'type' => MENU_LOCAL_TASK,
    'description' => 'Manage groups of users for node-specific access control.',
    'file' => 'simple_access.admin.inc',
  );
  $items['admin/config/content/simple-access/groups/add'] = array(
    'title' => 'Add group',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'simple_access_group_form',
    ),
    'access callback' => 'user_access',
    'access arguments' => array(
      'manage simple access',
    ),
    'type' => MENU_LOCAL_ACTION,
    'weight' => -6,
    'file' => 'simple_access.admin.inc',
  );
  $items['admin/config/content/simple-access/groups/%simple_access_group/edit'] = array(
    'title' => 'Edit Group',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'simple_access_group_form',
      5,
    ),
    'access callback' => 'user_access',
    'access arguments' => array(
      'manage simple access',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'simple_access.admin.inc',
  );
  $items['admin/config/content/simple-access/groups/%simple_access_group/delete'] = array(
    'title' => 'Delete Group',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'simple_access_delete_group_confirm',
      5,
    ),
    'access callback' => 'user_access',
    'access arguments' => array(
      'manage simple access',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'simple_access.admin.inc',
  );
  $items['admin/config/content/simple-access/profiles'] = array(
    'title' => 'Profiles',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'simple_access_profile_list',
    ),
    'access callback' => 'user_access',
    'access arguments' => array(
      'manage simple access',
    ),
    'type' => MENU_LOCAL_TASK,
    'description' => 'Maintain access profiles',
    'file' => 'simple_access.admin.inc',
  );
  $items['admin/config/content/simple-access/profiles/add'] = array(
    'title' => 'Add profile',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'simple_access_profile_form',
    ),
    'access callback' => 'user_access',
    'access arguments' => array(
      'manage simple access',
    ),
    'type' => MENU_LOCAL_ACTION,
    'file' => 'simple_access.admin.inc',
  );
  $items['admin/config/content/simple-access/profiles/%simple_access_profile/edit'] = array(
    'title' => 'Edit Profile',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'simple_access_profile_form',
      5,
    ),
    'access callback' => 'user_access',
    'access arguments' => array(
      'manage simple access',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'simple_access.admin.inc',
  );
  $items['admin/config/content/simple-access/profiles/%simple_access_profile/delete'] = array(
    'title' => 'Delete Profile',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'simple_access_profile_delete_confirm',
      5,
    ),
    'access callback' => 'user_access',
    'access arguments' => array(
      'manage simple access',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'simple_access.admin.inc',
  );
  return $items;
}