function access_scheme_taxonomy_term_realms in Access Control Kit 7
Realms callback for the taxonomy term scheme type.
See also
2 string references to 'access_scheme_taxonomy_term_realms'
- access_access_scheme_info in ./
access.access.inc - Implements hook_access_scheme_info().
- hook_access_scheme_info in ./
access.api.php - Defines access scheme types.
File
- callbacks/
access.taxonomy.inc, line 13 - Callback functions for the taxonomy access scheme type.
Code
function access_scheme_taxonomy_term_realms($scheme) {
if (!empty($scheme->settings['vocabulary'])) {
// Re-use the allowed values function for term reference fields.
$field = array();
$field['settings']['allowed_values'][] = array(
'vocabulary' => $scheme->settings['vocabulary'],
'parent' => 0,
);
return taxonomy_allowed_values($field);
}
return array();
}