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
87475c4f
Commit
87475c4f
authored
Feb 24, 2017
by
Derimagia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More code review
parent
2f3c0a26
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
+7
-9
src/EventSubscriber/MigrationEventSubscriber.php
src/EventSubscriber/MigrationEventSubscriber.php
+7
-9
No files found.
src/EventSubscriber/MigrationEventSubscriber.php
View file @
87475c4f
<?php
/**
* MigrationEventSubscriber for Debugging Migrations.
*
* @category Class
* @package migrate_devel
*/
namespace
Drupal\migrate_devel\EventSubscriber
;
use
Drupal\migrate\Event\MigrateEvents
;
...
...
@@ -14,6 +9,8 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface;
/**
* MigrationEventSubscriber for Debugging Migrations.
*
* @class MigrationEventSubscriber
*/
class
MigrationEventSubscriber
implements
EventSubscriberInterface
{
...
...
@@ -27,11 +24,11 @@ class MigrationEventSubscriber implements EventSubscriberInterface {
$using_drush
=
function_exists
(
'drush_get_option'
);
if
(
$using_drush
&&
drush_get_option
(
'migrate-debug-pre'
))
{
// Start
ing
with capital letter for variables since this is actually a label.
// Start with capital letter for variables since this is actually a label.
$Source
=
$row
->
getSource
();
$Destination
=
$row
->
getDestination
();
// We use kint directly here since we want to support variable naming
and CLI colors
.
// We use kint directly here since we want to support variable naming.
kint_require
();
\
Kint
::
dump
(
$Source
,
$Destination
);
}
...
...
@@ -47,11 +44,12 @@ class MigrationEventSubscriber implements EventSubscriberInterface {
$using_drush
=
function_exists
(
'drush_get_option'
);
if
(
$using_drush
&&
drush_get_option
(
'migrate-debug'
))
{
//
We use kint directly here since we want to support variable naming and CLI colors
.
//
Start with capital letter for variables since this is actually a label
.
$Source
=
$row
->
getSource
();
$Destination
=
$row
->
getDestination
();
$DestinationIDValues
=
$event
->
getDestinationIdValues
();
// We use kint directly here since we want to support variable naming.
kint_require
();
\
Kint
::
dump
(
$Source
,
$Destination
,
$DestinationIDValues
);
}
...
...
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