You are here

class ACKTestMeowHandler in Access Control Kit 7

Controls access to the fictitious 'cat' and 'dog' object types.

Hierarchy

Expanded class hierarchy of ACKTestMeowHandler

3 string references to 'ACKTestMeowHandler'
AccessAPITest::testHandlerCleanup in ./access.test
Test clean-up functions.
AccessAPITest::testHandlerInterface in ./access.test
Attach a handler to the test scheme through the UI.
AccessAPITest::testHandlerMethods in ./access.test
Test access arbitration through our dummy handler.

File

tests/ack_test.inc, line 11
Contains a dummy class for testing the access control kit handler API.

View source
class ACKTestMeowHandler extends AccessControlKitHandler {

  /**
   * Overrides AccessControlKitHandler::description().
   */
  public function description() {
    return t('The meow handler assigns the boolean TRUE realm to cats and the boolean FALSE realm to everything else.');
  }

  /**
   * Overrides AccessControlKitHandler::objectRealms().
   */
  public function objectRealms($object_type, $object) {
    return $object_type == 'cat' ? array(
      TRUE,
    ) : array(
      FALSE,
    );
  }

  /**
   * Overrides AccessControlKitHandler::settingsForm().
   */
  public function settingsForm() {
    $form['access_test'] = array(
      '#markup' => t('Meow handler settings would go here.'),
    );
    return $form;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
AccessControlKitHandler::$settings protected property The access handler configuration.
AccessControlKitHandler::getSettings public function Implements AccessControlKitHandlerInterface::getSettings(). Overrides AccessControlKitHandlerInterface::getSettings
AccessControlKitHandler::objectFormAlter public function Implements AccessControlKitHandlerInterface::objectFormAlter(). Overrides AccessControlKitHandlerInterface::objectFormAlter 3
AccessControlKitHandler::objectFormSubmit public function Implements AccessControlKitHandlerInterface::objectFormSubmit(). Overrides AccessControlKitHandlerInterface::objectFormSubmit 1
AccessControlKitHandler::objectFormValidate public function Implements AccessControlKitHandlerInterface::objectFormValidate(). Overrides AccessControlKitHandlerInterface::objectFormValidate
AccessControlKitHandler::viewsDataAlter public function Implements AccessControlKitHandlerInterface::viewsDataAlter(). Overrides AccessControlKitHandlerInterface::viewsDataAlter 1
AccessControlKitHandler::__construct public function Implements AccessControlKitHandlerInterface::__construct(). Overrides AccessControlKitHandlerInterface::__construct 3
ACKTestMeowHandler::description public function Overrides AccessControlKitHandler::description(). Overrides AccessControlKitHandler::description
ACKTestMeowHandler::objectRealms public function Overrides AccessControlKitHandler::objectRealms(). Overrides AccessControlKitHandler::objectRealms
ACKTestMeowHandler::settingsForm public function Overrides AccessControlKitHandler::settingsForm(). Overrides AccessControlKitHandler::settingsForm