protected function WebformCliService::_drush_get_options in Webform 6.x
Same name and namespace in other branches
- 8.5 src/Commands/WebformCliService.php \Drupal\webform\Commands\WebformCliService::_drush_get_options()
Get drush command options with dashed converted to underscores.
Parameters
array $default_options: The commands default options
Return value
array An associative array of options.
1 call to WebformCliService::_drush_get_options()
- WebformCliService::drush_webform_import in src/
Commands/ WebformCliService.php
File
- src/
Commands/ WebformCliService.php, line 1552
Class
- WebformCliService
- Drush version agnostic commands.
Namespace
Drupal\webform\CommandsCode
protected function _drush_get_options(array $default_options) {
$options = $this
->drush_redispatch_get_options();
// Convert dashes to underscores.
foreach ($options as $key => $value) {
unset($options[$key]);
if (isset($default_options[$key]) && is_array($default_options[$key])) {
$value = explode(',', $value);
}
$options[str_replace('-', '_', $key)] = $value;
}
$options += $default_options;
return $options;
}