Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
M
migrate_devel
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
migrate_devel
Commits
3904c3d0
Commit
3904c3d0
authored
Jun 11, 2020
by
andrewmacpherson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#2938677
: Register new options for drush migrate:import in Drush 9+
parent
487079ca
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
5 deletions
+14
-5
migrate_devel.drush.inc
migrate_devel.drush.inc
+0
-5
src/Commands/MigrateDevelCommands.php
src/Commands/MigrateDevelCommands.php
+14
-0
No files found.
migrate_devel.drush.inc
View file @
3904c3d0
...
...
@@ -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'
;
}
...
...
src/Commands/MigrateDevelCommands.php
View file @
3904c3d0
...
...
@@ -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.
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment