function drush_migrate_get_options in Migrate 7.2
Same name and namespace in other branches
- 6.2 migrate.drush.inc \drush_migrate_get_options()
- 6 migrate.drush.inc \drush_migrate_get_options()
Get the value of all migrate related options. Used when spawning a subshell. Don't pass along all, stop, update, and rollback options.
Return value
An array of command specific options and their values.
1 call to drush_migrate_get_options()
File
- ./
migrate.drush.inc, line 253 - Drush support for the migrate module
Code
function drush_migrate_get_options() {
$options = array();
$blacklist = array(
'stop',
'rollback',
'update',
'all',
'group',
);
$command = drush_parse_command();
$global_options = drush_get_global_options();
$opts = array_merge($command['options'], $global_options);
foreach ($opts as $key => $value) {
// Strip leading --
$key = ltrim($key, '-');
if (!in_array($key, $blacklist)) {
$value = drush_get_option($key);
if (isset($value)) {
$options[$key] = $value;
}
}
}
return $options;
}