class ACKTestMeowHandler in Access Control Kit 7
Controls access to the fictitious 'cat' and 'dog' object types.
Hierarchy
- class \AccessControlKitHandler implements AccessControlKitHandlerInterface
- class \ACKTestMeowHandler
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;
}
}