function views_bulk_operations_drush_command in Views Bulk Operations (VBO) 6.3
Same name and namespace in other branches
- 8.3 views_bulk_operations.drush.inc \views_bulk_operations_drush_command()
- 8 views_bulk_operations.drush.inc \views_bulk_operations_drush_command()
- 8.2 views_bulk_operations.drush.inc \views_bulk_operations_drush_command()
- 6 views_bulk_operations.drush.inc \views_bulk_operations_drush_command()
- 7.3 views_bulk_operations.drush.inc \views_bulk_operations_drush_command()
- 4.0.x views_bulk_operations.drush.inc \views_bulk_operations_drush_command()
Implementation of hook_drush_command().
File
- ./
views_bulk_operations.drush.inc, line 18
Code
function views_bulk_operations_drush_command() {
$items['vbo-list'] = array(
'callback' => 'views_bulk_operations_drush_list',
'description' => 'List all Views Bulk Operations (VBO) views, along with the operations associated with each.',
);
$items['vbo-execute'] = array(
'callback' => 'views_bulk_operations_drush_execute',
'description' => 'Execute a bulk operation based on a Views Bulk Operations (VBO) view.',
'arguments' => array(
'vid' => 'ID or name of the view to be executed.',
'operation' => 'Callback name of the operation to be applied on the view results.',
'type:[name=]value ...' => 'Parameters to be passed as view input filters, view arguments or operation arguments, where type is respectively {input, argument, operation}.',
),
'examples' => array(
'$ drush vbo-execute admin_content node_publish_action' => 'Publish nodes returned by view admin_content.',
'$ drush vbo-execute 44 node_assign_owner_action operation:owner_uid=3' => 'Change node ownership on nodes returned by view #44, passing argument owner_uid=3 to the action.',
'$ drush vbo-execute admin_content node_unpublish_action input:type=expense argument:3' => 'Unpublish nodes returned by view admin_content, filtering results of type expense and passing value 3 as first view argument.',
),
);
return $items;
}