function webform_drush_command in Webform 7.4
Same name and namespace in other branches
- 8.5 drush/webform.drush.inc \webform_drush_command()
- 6.x drush/webform.drush.inc \webform_drush_command()
Implements hook_drush_command().
File
- ./
webform.drush.inc, line 11 - Functions relating to Drush integration.
Code
function webform_drush_command() {
return array(
'webform-export' => array(
'description' => 'Exports webform data to a file.',
'arguments' => array(
'nid' => 'The node ID of the webform you want to export (required)',
),
'options' => array(
'file' => 'The file path to export to (defaults to print to stdout)',
'format' => 'The exporter format to use. Out-of-the-box this may be "delimited" or "excel".',
'delimiter' => 'Delimiter between columns (defaults to site-wide setting). This option may need to be wrapped in quotes. i.e. --delimter="\\t".',
'components' => 'Comma-separated list of component IDs or form keys to include.' . "\n" . 'May also include "webform_serial", "webform_sid", "webform_time", "webform_complete_time", "webform_modified_time", "webform_draft", "webform_ip_address", "webform_uid", and "webform_username".',
'header-keys' => 'Integer -1 for none, 0 for label (default) or 1 for form key.',
'select-keys' => 'Integer 0 or 1 value. Set to 1 to print select list values by their form keys instead of labels.',
'select-format' => 'Set to "separate" (default) or "compact" to determine how select list values are exported.',
'range-type' => 'Range of submissions to export: "all", "new", "latest", "range" (by sid, default if start is supplied), "range-serial", or "range-date".',
'range-latest' => 'Integer specifying the latest X submissions will be downloaded. Used if "range-type" is "latest" or no other range options are provided.',
'range-start' => 'The submission ID, serial number, or start date at which to start exporting.',
'range-end' => 'The submission ID, serial number, or end date at which to end exporting.',
'completion-type' => 'Submissions to be included: "finished", "draft" or "all" (default).',
'batch-size' => 'The size of batches in rows (default 10000). If encountering out of memory errors, set this number lower to export fewer submissions per batch.',
),
'aliases' => array(
'wfx',
),
),
'webform-clear' => array(
'description' => 'Clear a webform by deleting all its submissions.',
'arguments' => array(
'nid' => 'The node ID of the webform you want to clear (required)',
),
'options' => array(
'batch-size' => 'The size of batches in rows (default 10000). If encountering out of memory errors, set this number lower to export fewer submissions per batch.',
),
),
);
}