Commit 3904c3d0 authored by andrewmacpherson's avatar andrewmacpherson

Issue #2938677: Register new options for drush migrate:import in Drush 9+

parent 487079ca
......@@ -14,11 +14,6 @@ use Drush\Log\LogLevel;
* Implements hook_drush_help_alter().
*/
function migrate_devel_drush_help_alter(&$command) {
if ($command['command'] === 'migrate-import') {
$command['options']['migrate-debug'] = 'Enable Debug Mode';
$command['options']['migrate-debug-pre'] = 'Enable Debug Mode (Before Row Save)';
}
if ($command['command'] === 'migrate-status') {
$command['options']['migrate-debug'] = 'Enable Debug Mode';
}
......
......@@ -2,6 +2,7 @@
namespace Drupal\migrate_devel\Commands;
use Consolidation\AnnotatedCommand\CommandData;
use Drush\Commands\DrushCommands;
/**
......@@ -9,4 +10,17 @@ use Drush\Commands\DrushCommands;
*/
class MigrateDevelCommands extends DrushCommands {
/**
* Register two new options for the migrate:import command.
*
* @hook command migrate:import
* @option migrate-debug Enable Debug Mode
* @option migrate-debug-pre Enable Debug Mode (Before Row Save)
*/
public function additionalOptionsMigrateImport(CommandData $commandData)
{
// No action required here. The new options will be examined in the
// migrate event subscriber methods.
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment