function patterns_parser_extract_modules in Patterns 7.2
Same name and namespace in other branches
- 7 includes/parser/parser.inc \patterns_parser_extract_modules()
Extract all the values of the modules tag from a pattern and returns them as an array.
1 call to patterns_parser_extract_modules()
- patterns_install_modules_in_pattern in ./
patterns.module - Extract all the values of the modules tag from a pattern and returns them as an array.
File
- includes/
parser/ parser.inc, line 707
Code
function patterns_parser_extract_modules($pattern) {
$modules = array();
if (!empty($pattern) && isset($pattern['modules'])) {
$modules = !is_array($pattern['modules']) ? array(
$modules,
) : $pattern['modules'];
}
return $modules;
}