You are here

public function AccessSchemeEntityController::attachHandler in Access Control Kit 7

Attaches a handler to a scheme object.

Parameters

object $scheme: The access scheme to which the handler will be attached.

string $object_type: The type of Drupal object that the handler will manage (e.g., node).

string $class: The name of the access handler class.

array $settings: (optional) An array of settings to control the handler's behavior.

1 call to AccessSchemeEntityController::attachHandler()
AccessSchemeEntityController::attachLoad in ./access_scheme_entity_controller.inc
Overrides DrupalDefaultEntityController::attachLoad().

File

./access_scheme_entity_controller.inc, line 80
Contains the access scheme entity controller.

Class

AccessSchemeEntityController
Provides the entity controller for access schemes.

Code

public function attachHandler($scheme, $object_type, $class, $settings = array()) {
  if (class_exists($class)) {
    $scheme->handlers[$object_type] = new $class($scheme, $settings);
  }
}