You are here

function hook_access_info in Access Control Kit 7

Declares manageable object types for access control kit.

Modules can implement this hook to integrate various types of Drupal objects (such as nodes, menu links, etc.) with the access control kit module's access scheme/grants system. It is up to the module to handle the actual mechanics of that integration; implementing this hook simply notifies ACK that the object types are available. For example, the ACK node module implements this hook to notify ACK that it is making nodes available for access control. It then implements other hooks (such as hook_access_handler_info(), hook_permission() and hook_node_access()) to provide the integration.

Return value

array An array whose keys are access-controllable object type names and whose values declare the properties of those types that are need by the access control kit module. If the object type is a Drupal entity, the object type name should be the same as the entity type name that was used as the key for its definition in hook_entity_info(). For example, if the module provides ACK integration for nodes, the key should be 'node'.

The properties of the object type are declared in an array as follows:

  • label: The human-readable name of the object type.

See also

access_info()

hook_access_info_alter()

3 functions implement hook_access_info()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

access_test_access_info in tests/access_test.module
Implements hook_access_info().
ack_menu_access_info in ack_menu/ack_menu.module
Implements hook_access_info().
ack_node_access_info in ack_node/ack_node.module
Implements hook_access_info().
1 invocation of hook_access_info()
access_info in ./access.module
Returns information on available access-controlled object types.

File

./access.api.php, line 39
Hooks provided by the access control kit module.

Code

function hook_access_info() {

  // Declare nodes as access-controllable objects.
  $info['node'] = array(
    'label' => t('Content'),
  );
  return $info;
}