function drush_patterns in Patterns 7.2
Same name and namespace in other branches
- 7 patterns.drush.inc \drush_patterns()
patterns list command callback.
1 string reference to 'drush_patterns'
- patterns_drush_command in ./
patterns.drush.inc - Implements hook_drush_command().
File
- ./
patterns.drush.inc, line 228 - Drush Patterns module commands
Code
function drush_patterns() {
$patterns = patterns_io_get_patterns();
$patterns = $patterns[PATTERNS_STATUS_OK];
$pipe = array();
$rows[] = array(
dt('Id'),
dt('Name'),
dt('Title'),
dt('Status'),
dt('Version'),
);
foreach ($patterns as $pid => $pattern) {
$rows[] = array(
$pattern->pid,
$pattern->name,
$pattern->title,
$pattern->status,
$pattern->info['version'],
);
$pipe[] = "{$pattern->title}";
}
drush_print_table($rows, TRUE);
drush_print_pipe(implode(' ', $pipe));
}