Commit d98f9b8e authored by Gábor Hojtsy's avatar Gábor Hojtsy

Issue #2927844 by Jo Fitzgerald, quietone, heddn: Correct references to...

Issue #2927844 by Jo Fitzgerald, quietone, heddn: Correct references to 'iterator' plugin to be 'sub_process'
parent 017e42ed
......@@ -44,7 +44,7 @@ public function getFieldFormatterMap() {
*/
public function processFieldValues(MigrationInterface $migration, $field_name, $data) {
$process = [
'plugin' => 'iterator',
'plugin' => 'sub_process',
'source' => $field_name,
'process' => [
'value' => 'email',
......
......@@ -62,7 +62,7 @@ public function processFieldValues(MigrationInterface $migration, $field_name, $
];
$process = [
'plugin' => 'iterator',
'plugin' => 'sub_process',
'source' => $field_name,
'process' => $process,
];
......
......@@ -67,7 +67,7 @@ public function processFieldValues(MigrationInterface $migration, $field_name, $
];
$process = [
'plugin' => 'iterator',
'plugin' => 'sub_process',
'source' => $field_name,
'process' => $process,
];
......
......@@ -51,7 +51,7 @@ public function getFieldFormatterMap() {
*/
public function processCckFieldValues(MigrationInterface $migration, $field_name, $data) {
$process = [
'plugin' => 'iterator',
'plugin' => 'sub_process',
'source' => $field_name,
'process' => [
'target_id' => 'fid',
......
......@@ -27,7 +27,7 @@ class ImageField extends CckFieldPluginBase {
*/
public function processCckFieldValues(MigrationInterface $migration, $field_name, $data) {
$process = [
'plugin' => 'iterator',
'plugin' => 'sub_process',
'source' => $field_name,
'process' => [
'target_id' => 'fid',
......
......@@ -20,7 +20,7 @@ class FileField extends D6FileField {
*/
public function processFieldValues(MigrationInterface $migration, $field_name, $data) {
$process = [
'plugin' => 'iterator',
'plugin' => 'sub_process',
'source' => $field_name,
'process' => [
'target_id' => 'fid',
......
......@@ -20,7 +20,7 @@ class ImageField extends FieldPluginBase {
*/
public function processFieldValues(MigrationInterface $migration, $field_name, $data) {
$process = [
'plugin' => 'iterator',
'plugin' => 'sub_process',
'source' => $field_name,
'process' => [
'target_id' => 'fid',
......
......@@ -51,7 +51,7 @@ public function testProcessCckFieldValues() {
$this->plugin->processCckFieldValues($this->migration, 'somefieldname', []);
$expected = [
'plugin' => 'iterator',
'plugin' => 'sub_process',
'source' => 'somefieldname',
'process' => [
'target_id' => 'fid',
......
......@@ -50,7 +50,7 @@ public function testProcessCckFieldValues() {
$this->plugin->processCckFieldValues($this->migration, 'somefieldname', []);
$expected = [
'plugin' => 'iterator',
'plugin' => 'sub_process',
'source' => 'somefieldname',
'process' => [
'target_id' => 'fid',
......
......@@ -50,7 +50,7 @@ public function testProcessFieldValues() {
$this->plugin->processFieldValues($this->migration, 'somefieldname', []);
$expected = [
'plugin' => 'iterator',
'plugin' => 'sub_process',
'source' => 'somefieldname',
'process' => [
'target_id' => 'fid',
......
......@@ -49,7 +49,7 @@ public function testProcessFieldValues() {
$this->plugin->processFieldValues($this->migration, 'somefieldname', []);
$expected = [
'plugin' => 'iterator',
'plugin' => 'sub_process',
'source' => 'somefieldname',
'process' => [
'target_id' => 'fid',
......
......@@ -36,7 +36,7 @@ class MigrateProcessPlugin extends Plugin {
* Whether the plugin handles multiples itself.
*
* Typically these plugins will expect an array as input and iterate over it
* themselves, changing the whole array. For example the 'iterator' and the
* themselves, changing the whole array. For example the 'sub_process' and the
* 'flatten' plugins. If the plugin only need to change a single value it
* can skip setting this attribute and let
* \Drupal\migrate\MigrateExecutable::processRow() handle the iteration.
......
......@@ -621,7 +621,7 @@ protected function findMigrationDependencies($process) {
if ($plugin_configuration['plugin'] == 'migration') {
$return = array_merge($return, (array) $plugin_configuration['migration']);
}
if ($plugin_configuration['plugin'] == 'iterator') {
if ($plugin_configuration['plugin'] == 'sub_process') {
$return = array_merge($return, $this->findMigrationDependencies($plugin_configuration['process']));
}
}
......
......@@ -94,7 +94,7 @@
*
* process:
* filters:
* plugin: iterator
* plugin: sub_process
* source: filters
* key: "@id"
* process:
......
......@@ -42,7 +42,7 @@ public function testGetMigrationDependencies() {
'migration' => 'm1'
],
'f3' => [
'plugin' => 'iterator',
'plugin' => 'sub_process',
'process' => [
'target_id' => [
'plugin' => 'migration',
......
......@@ -22,7 +22,7 @@ class NodeReference extends FieldPluginBase {
*/
public function processFieldValues(MigrationInterface $migration, $field_name, $data) {
$process = [
'plugin' => 'iterator',
'plugin' => 'sub_process',
'source' => $field_name,
'process' => [
'target_id' => [
......
......@@ -22,7 +22,7 @@ class UserReference extends FieldPluginBase {
*/
public function processFieldValues(MigrationInterface $migration, $field_name, $data) {
$process = [
'plugin' => 'iterator',
'plugin' => 'sub_process',
'source' => $field_name,
'process' => [
'target_id' => [
......
......@@ -30,7 +30,7 @@ class TaxonomyTermReference extends CckFieldPluginBase {
*/
public function processCckFieldValues(MigrationInterface $migration, $field_name, $data) {
$process = [
'plugin' => 'iterator',
'plugin' => 'sub_process',
'source' => $field_name,
'process' => [
'target_id' => 'tid',
......
......@@ -23,7 +23,7 @@ class TaxonomyTermReference extends FieldPluginBase {
*/
public function processFieldValues(MigrationInterface $migration, $field_name, $data) {
$process = [
'plugin' => 'iterator',
'plugin' => 'sub_process',
'source' => $field_name,
'process' => [
'target_id' => 'tid',
......
......@@ -51,7 +51,7 @@ public function testProcessCckFieldValues() {
$this->plugin->processFieldValues($this->migration, 'somefieldname', []);
$expected = [
'plugin' => 'iterator',
'plugin' => 'sub_process',
'source' => 'somefieldname',
'process' => [
'target_id' => 'tid',
......
......@@ -50,7 +50,7 @@ public function testProcessFieldValues() {
$this->plugin->processFieldValues($this->migration, 'somefieldname', []);
$expected = [
'plugin' => 'iterator',
'plugin' => 'sub_process',
'source' => 'somefieldname',
'process' => [
'target_id' => 'tid',
......
......@@ -100,7 +100,7 @@ public function processCckFieldValues(MigrationInterface $migration, $field_name
}
$process = [
'plugin' => 'iterator',
'plugin' => 'sub_process',
'source' => $field_name,
'process' => $process,
];
......
......@@ -92,7 +92,7 @@ public function processFieldValues(MigrationInterface $migration, $field_name, $
}
$process = [
'plugin' => 'iterator',
'plugin' => 'sub_process',
'source' => $field_name,
'process' => $process,
];
......
......@@ -55,7 +55,7 @@ public function testProcessFilteredTextFieldValues() {
$this->plugin->processCckFieldValues($this->migration, 'body', $field_info);
$process = $this->migration->getProcess();
$this->assertSame('iterator', $process['plugin']);
$this->assertSame('sub_process', $process['plugin']);
$this->assertSame('body', $process['source']);
$this->assertSame('value', $process['process']['value']);
......
......@@ -55,7 +55,7 @@ public function testProcessFilteredTextFieldValues() {
$this->plugin->processFieldValues($this->migration, 'body', $field_info);
$process = $this->migration->getProcess();
$this->assertSame('iterator', $process['plugin']);
$this->assertSame('sub_process', $process['plugin']);
$this->assertSame('body', $process['source']);
$this->assertSame('value', $process['process']['value']);
......
......@@ -55,7 +55,7 @@ public function testProcessFilteredTextFieldValues() {
$this->plugin->processCckFieldValues($this->migration, 'body', $field_info);
$process = $this->migration->getProcess();
$this->assertSame('iterator', $process['plugin']);
$this->assertSame('sub_process', $process['plugin']);
$this->assertSame('body', $process['source']);
$this->assertSame('value', $process['process']['value']);
......
......@@ -54,7 +54,7 @@ public function testProcessFilteredTextFieldValues() {
$this->plugin->processFieldValues($this->migration, 'body', $field_info);
$process = $this->migration->getProcess();
$this->assertSame('iterator', $process['plugin']);
$this->assertSame('sub_process', $process['plugin']);
$this->assertSame('body', $process['source']);
$this->assertSame('value', $process['process']['value']);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment