function hook_oa_core_space_type_options in Open Atrium Core 7.2
Gets space_type or section_type options from a Taxonomy term.
This hook is used to take a Taxonomy term and covert it's data into options about a Space Blueprint, to be used in Javascript on the node edit page.
Parameters
object $term: A Taxonomy term object.
string $vocab_name: The name of the vocabulary that this Taxonomy term comes from.
Return value
array An associative array representing information about this Taxonomy term to add to the Javascript options.
Related topics
2 functions implement hook_oa_core_space_type_options()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- oa_buttons_oa_core_space_type_options in modules/
oa_buttons/ oa_buttons.module - Implements hook_oa_core_space_type_options().
- oa_core_oa_core_space_type_options in ./
oa_core.module - Implements hook_oa_core_space_type_options().
1 invocation of hook_oa_core_space_type_options()
- oa_core_get_space_type_options in ./
oa_core.module - Gets all the options for space_type or section_type.
File
- ./
oa_core.api.php, line 28 - Contains documentation about the Open Atrium Core module's hooks.
Code
function hook_oa_core_space_type_options($term, $vocab_name) {
// Add a new field to the option data, but only for 'space_type' terms (as
// opposed to 'section_type' which also uses this hook).
if ($vocab_name == 'space_type') {
return array(
'my_field_value' => $term->field_my_field[LANGUAGE_NONE][0]['value'],
);
}
}