public function ACKEntityTaxonomyTermReference::__construct in Access Control Kit 7
Overrides ACKEntityField::__construct().
Overrides ACKEntityField::__construct
File
- handlers/
ack_entity_taxonomy_term_reference.inc, line 23 - Contains the handler class for term reference fields on entities.
Class
- ACKEntityTaxonomyTermReference
- Controls access to an entity based on a taxonomy term reference field.
Code
public function __construct($scheme, array $settings = array()) {
parent::__construct($scheme, $settings);
// The choice of field is a handler-level setting.
$this->fieldName = isset($settings['field_name']) ? $settings['field_name'] : NULL;
// Taxonomy term reference fields use 'tid' as the value key.
$this->fieldValueKey = 'tid';
// Get the vocabulary from the scheme settings.
$this->vocabulary = isset($scheme->settings['vocabulary']) ? $scheme->settings['vocabulary'] : NULL;
}