You are here

function _patterns_moduletags_add_module in Patterns 7

Same name and namespace in other branches
  1. 7.2 includes/ \_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.


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



1 call to _patterns_moduletags_add_module()
patterns_moduletags_get_index in includes/
Builds up an associative array of modules and exposed tags.


includes/, line 259
Functions related to build and retrieve information from the *tagmodules* and *moduletags* indexes.


function _patterns_moduletags_add_module($module, &$moduletags, $data = NULL) {
  if (empty($moduletags)) {
    $moduletags = array();
  if (empty($module)) {
  $tags = module_invoke($module, 'patterns', $data);
  $moduletags[$module] = $tags;