You are here

function views_bulk_operations_drush_command in Views Bulk Operations (VBO) 8.2

Same name and namespace in other branches
  1. 8.3 views_bulk_operations.drush.inc \views_bulk_operations_drush_command()
  2. 8 views_bulk_operations.drush.inc \views_bulk_operations_drush_command()
  3. 6.3 views_bulk_operations.drush.inc \views_bulk_operations_drush_command()
  4. 6 views_bulk_operations.drush.inc \views_bulk_operations_drush_command()
  5. 7.3 views_bulk_operations.drush.inc \views_bulk_operations_drush_command()
  6. 4.0.x views_bulk_operations.drush.inc \views_bulk_operations_drush_command()

Implements hook_drush_command().

File

./views_bulk_operations.drush.inc, line 14
Contains code providing drush commands functionality.

Code

function views_bulk_operations_drush_command() {
  return [
    'views-bulk-operations-execute' => [
      'description' => 'Execute an action on all results of the given view.',
      'aliases' => [
        'vbo-execute',
        'vbo-exec',
      ],
      'arguments' => [
        'view_id' => 'The ID of the view to use',
        'action_id' => 'The ID of the action to execute',
      ],
      'options' => [
        'display-id' => 'ID of the display to use (default: default)',
        'args' => 'View arguments (slash is a delimeter, default: none)',
        'exposed' => 'Exposed filters (query string format)',
        'batch-size' => 'Processing batch size (default: 100)',
        'config' => 'Action configuration (query string format)',
        'debug' => 'Include additional debugging information.',
      ],
      'examples' => [
        'drush vbo-execute some_view some_action --user=1' => 'Execute some action on some view as the superuser.',
        'drush vbo-execute some_view some_action --args=arg1/arg2 --batch-size=50' => 'Execute some action on some view with arg1 and arg2 as view arguments and 50 entities processed per batch.',
        'drush vbo-execute some_view some_action --config="key1=value1&key2=value2"' => 'Execute some action on some view with action configuration set.',
      ],
    ],
  ];
}