function _patterns_moduletags_add_module in Patterns 7
Same name and namespace in other branches
- 7.2 includes/tagmodules.inc \_patterns_moduletags_add_module()
Helper function for <patterns_api_build_moduletags_index>.
Call <hook_patterns> on a given module and merge the results in the moduletags index.
Parameters
mixed $module A string representing a module (component) name:
array $moduletags An array containing the moduletags index:
array $data (optional) An associative array of data, that the: components can use to build dynamic forms names. Defaults NULL.
See also
patterns_tagmodules_get_index()
_patterns_add_module_to_tags()
1 call to _patterns_moduletags_add_module()
- patterns_moduletags_get_index in includes/
tagmodules.inc - Builds up an associative array of modules and exposed tags.
File
- includes/
tagmodules.inc, line 259 - Functions related to build and retrieve information from the *tagmodules* and *moduletags* indexes.
Code
function _patterns_moduletags_add_module($module, &$moduletags, $data = NULL) {
if (empty($moduletags)) {
$moduletags = array();
}
if (empty($module)) {
return;
}
$tags = module_invoke($module, 'patterns', $data);
$moduletags[$module] = $tags;
}