Issue #2549003 follow-up by phenaproxima: Fix regression in Migrate Upgrade.
parent
d5821399fc
commit
9f7321168e
|
@ -8,6 +8,7 @@
|
||||||
namespace Drupal\user\Plugin\migrate\builder\d6;
|
namespace Drupal\user\Plugin\migrate\builder\d6;
|
||||||
|
|
||||||
use Drupal\migrate\Entity\Migration;
|
use Drupal\migrate\Entity\Migration;
|
||||||
|
use Drupal\migrate\Exception\RequirementsException;
|
||||||
use Drupal\migrate\Plugin\migrate\builder\BuilderBase;
|
use Drupal\migrate\Plugin\migrate\builder\BuilderBase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -21,7 +22,17 @@ class ProfileValues extends BuilderBase {
|
||||||
public function buildMigrations(array $template) {
|
public function buildMigrations(array $template) {
|
||||||
$migration = Migration::create($template);
|
$migration = Migration::create($template);
|
||||||
|
|
||||||
foreach ($this->getSourcePlugin('d6_profile_field') as $field) {
|
// @TODO The source plugin should accept a database connection.
|
||||||
|
// @see https://www.drupal.org/node/2552791
|
||||||
|
$source_plugin = $this->getSourcePlugin('d6_profile_field', $template['source']);
|
||||||
|
try {
|
||||||
|
$source_plugin->checkRequirements();
|
||||||
|
}
|
||||||
|
catch (RequirementsException $e) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($source_plugin as $field) {
|
||||||
$migration->setProcessOfProperty($field->getSourceProperty('name'), $field->getSourceProperty('name'));
|
$migration->setProcessOfProperty($field->getSourceProperty('name'), $field->getSourceProperty('name'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue