wxt-8.x-3.011/modules/custom/wxt_ext/wxt_ext_migration/src/Plugin/migrate/source/CustomEmbeddedDataSource.php
modules/custom/wxt_ext/wxt_ext_migration/src/Plugin/migrate/source/CustomEmbeddedDataSource.php
<?php
namespace Drupal\wxt_ext_migration\Plugin\migrate\source;
use Drupal\migrate\Plugin\migrate\source\EmbeddedDataSource;
use Drupal\migrate\Row;
/**
* Provides custom_embedded_data source plugin.
*
* @MigrateSource(
* id = "custom_embedded_data"
* )
*/
class CustomEmbeddedDataSource extends EmbeddedDataSource {
/**
* {@inheritdoc}
*/
public function prepareRow(Row $row) {
$nid = $row->getSourceProperty('name');
$row->setSourceProperty('nid', $nid);
$row->setDestinationProperty('nid', $nid);
return parent::prepareRow($row);
}
}
