function _acquia_lift_get_taxonomy_context_options in Acquia Lift Connector 7.3
Gets all of the node fields that include taxonomy terms.
Return value
array An array of contextual options that can be used for grouped output.
1 call to _acquia_lift_get_taxonomy_context_options()
- _acquia_lift_get_context_options in ./
acquia_lift.context.inc - Gets all options for mappable contexts
File
- ./
acquia_lift.context.inc, line 40 - acquia_lift.context.inc Provides functions needed for handling visitor contexts.
Code
function _acquia_lift_get_taxonomy_context_options() {
if (!module_exists('taxonomy')) {
return array();
}
$vocabularies = taxonomy_get_vocabularies();
$options = array();
foreach ($vocabularies as $vocabulary) {
$machine_name = $vocabulary->machine_name;
$options[$machine_name] = array(
'name' => $vocabulary->name,
'machine_name' => $vocabulary->machine_name,
'group' => 'Taxonomy',
'id' => $vocabulary->vid,
);
}
return $options;
}