You are here

function _patterns_tagmodules_add_module_to_tags in Patterns 7.2

Same name and namespace in other branches
  1. 7 includes/tagmodules.inc \_patterns_tagmodules_add_module_to_tags()

Helper function for <_patterns_tagmodules_add_module>

Adds the name of the module to each tag returned from <hook_patterns>.

Parameters

mixed $module A string representing a module (component) name:

array $tags Array containing the results of the invocation of: <hook_patterns> on a module.

1 call to _patterns_tagmodules_add_module_to_tags()
_patterns_tagmodules_add_module in includes/tagmodules.inc
Helper function for <patterns_tagmodules_get_index>.

File

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

Code

function _patterns_tagmodules_add_module_to_tags($module, &$tags) {
  if (empty($tags)) {
    return;
  }
  foreach ($tags as $tagname => $value) {
    $tags[$tagname]['module'] = $module;
  }
}