function drush_patterns_run_pattern in Patterns 7
Same name and namespace in other branches
- 7.2 patterns.drush.inc \drush_patterns_run_pattern()
2 calls to drush_patterns_run_pattern()
- drush_patterns_run in ./
patterns.drush.inc - Imports, enables, and runs the specified pattern file
- patterns_load_file_and_start_engine in ./
patterns.drush.inc
File
- ./
patterns.drush.inc, line 517 - Drush Patterns module commands
Code
function drush_patterns_run_pattern($pattern, $mode = 'php', $params = array()) {
$result = patterns_start_engine($pattern, $params, $mode);
if ($result) {
if ($mode === 'batch') {
$batch =& batch_get();
$batch['progressive'] = FALSE;
drush_backend_batch_process();
}
drush_print(dt('Pattern execution started.'));
}
else {
drush_set_error(dt('An error occurred while processing the pattern file.'));
}
return $result;
}