You are here

function ack_menu_access_handler_info in Access Control Kit 7

Implements hook_access_handler_info().

File

ack_menu/ack_menu.module, line 20
The ACK menu module.

Code

function ack_menu_access_handler_info() {

  // To keep URLs sane on management pages, only allow integer-based schemes.
  // Integers also make link-to-realm mapping much easier and more searchable.
  $integer_schemes = array();
  foreach (access_scheme_info() as $scheme_info) {
    if ($scheme_info['data_type'] == 'integer') {
      $integer_schemes[] = $scheme_info['type'];
    }
  }
  $info = array();

  // Handler to map menu links to realms.
  $info['AckMenuMap'] = array(
    'label' => t('Administratively assigned'),
    'scheme types' => $integer_schemes,
    'object types' => array(
      'menu_link',
    ),
  );

  // @todo Support access to a menu item based on the node it links to?
  return $info;
}