function views_bulk_operations_drush_command in Views Bulk Operations (VBO) 6
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.3 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' => 'drush_views_bulk_operations_list',
'description' => 'List all Views Bulk Operations (VBO) views, along with the operations associated with each.',
);
$items['vbo-execute'] = array(
'callback' => 'drush_views_bulk_operations_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.',
'input:name=value ...' => 'Parameter to be passed as view input filter.',
'operation:name=value ...' => 'Parameter to be passed as operation argument.',
'argument:value ...' => 'Parameter to be passed as view argument.',
),
'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;
}