function sweaver_drush_style in Sweaver 6
Same name and namespace in other branches
- 7 drush/sweaver.drush.inc \sweaver_drush_style()
Edit a style via drush.
Parameters
$args: Arguments passed by the CLI.
Return value
$mixed Either a list of styles or start up the editor functionality.
1 string reference to 'sweaver_drush_style'
- sweaver_drush_command in drush/
sweaver.drush.inc - Implementation of hook_drush_command().
File
- drush/
sweaver.drush.inc, line 61 - Sweaver Drush functions.
Code
function sweaver_drush_style() {
$args = func_get_args();
$styles = sweaver_drush_list_styles();
$action = sweaver_drush_verify($args);
switch ($action) {
case 'list':
return sweaver_drush_print_styles($styles);
break;
case 'edit':
if (isset($styles[$args[0]])) {
sweaver_drush_verify_edit($styles[$args[0]]);
return sweaver_drush_edit_style($styles[$args[0]]);
}
drush_print(dt('Style id does not exists.'));
}
}