You are here

function hook_enabled in ACL 8

Same name and namespace in other branches
  1. 7 acl.api.php \hook_enabled()

Inform ACL module that the client module is enabled.

ACL will not return its NA records for your module if your module does not confirm that it's active.

If you use the example below, you can disable ACL on hook_disable using:

function MYMODULE_disable() {
  MYMODULE_enabled(FALSE);
}
1 function implements hook_enabled()

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

acl_node_test_enabled in tests/modules/acl_node_test/acl_node_test.module
Implements hook_enabled().
1 invocation of hook_enabled()
acl_node_access_records in ./acl.module
Implements hook_node_access_records().

File

./acl.api.php, line 32
API documentation for ACL.

Code

function hook_enabled($set = NULL) {
  static $enabled = TRUE;

  // not drupal_static!
  if ($set !== NULL) {
    $enabled = $set;
  }
  return $enabled;
}