You are here

function patterns_modules in Patterns 5

Return a list of modules for a pattern

1 call to patterns_modules()
patterns_modules_page in ./patterns.module
List the modules used by a particular pattern

File

./patterns.module, line 1124
Enables extremely simple adding/removing features to your site with minimal to no configuration

Code

function patterns_modules($pattern) {
  $pattern = $pattern->pattern;
  for ($i = 0; $tag = $pattern[$i]; $i++) {
    if ($tag['tag'] == 'modules') {
      unset($tag['tag']);
      $modules = $tag;
      break;
    }
  }
  return $modules;
}