Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
processPipeline example
$return
= MigrationInterface::RESULT_COMPLETED;
if
(
$pipeline
)
{
$id_map
=
$this
->
getIdMap
(
)
;
$destination
=
$this
->migration->
getDestinationPlugin
(
)
;
while
(
$source
->
valid
(
)
)
{
$row
=
$source
->
current
(
)
;
$this
->sourceIdValues =
$row
->
getSourceIdValues
(
)
;
try
{
foreach
(
$pipeline
as
$destination_property_name
=>
$plugins
)
{
$this
->
processPipeline
(
$row
,
$destination_property_name
,
$plugins
, NULL
)
;
}
$save
= TRUE;
}
catch
(
MigrateException
$e
)
{
$this
->
getIdMap
(
)
->
saveIdMapping
(
$row
,
[
]
,
$e
->
getStatus
(
)
)
;
$msg
=
sprintf
(
"%s:%s:%s",
$this
->migration->
getPluginId
(
)
,
$destination_property_name
,
$e
->
getMessage
(
)
)
;
$this
->
saveMessage
(
$msg
,
$e
->
getLevel
(
)
)
;
$save
= FALSE;
}
catch
(
MigrateSkipRowException
$e
)
{
if
(
$e
->
getSaveToMap
(
)
)
{