Chris@0: init) { Chris@0: $this->init = TRUE; Chris@0: $definition['source'] = [ Chris@0: 'plugin' => 'profile_field', Chris@0: 'ignore_map' => TRUE, Chris@0: ] + $this->source; Chris@0: $definition['destination']['plugin'] = 'null'; Chris@14: $definition['idMap']['plugin'] = 'null'; Chris@0: try { Chris@17: $this->checkRequirements(); Chris@0: $profile_field_migration = $this->migrationPluginManager->createStubMigration($definition); Chris@16: $migrate_executable = new MigrateExecutable($profile_field_migration); Chris@0: $source_plugin = $profile_field_migration->getSourcePlugin(); Chris@0: $source_plugin->checkRequirements(); Chris@0: foreach ($source_plugin as $row) { Chris@0: $name = $row->getSourceProperty('name'); Chris@16: $fid = $row->getSourceProperty('fid'); Chris@16: // The user profile field name can be greater than 32 characters. Use Chris@16: // the migrated profile field name in the process pipeline. Chris@16: $configuration = Chris@16: [ Chris@16: 'migration' => 'user_profile_field', Chris@16: 'source_ids' => $fid, Chris@17: 'no_stub' => TRUE, Chris@16: ]; Chris@16: $plugin = $this->processPluginManager->createInstance('migration_lookup', $configuration, $profile_field_migration); Chris@16: $new_value = $plugin->transform($fid, $migrate_executable, $row, 'tmp'); Chris@16: if (isset($new_value[1])) { Chris@16: // Set the destination to the migrated profile field name. Chris@16: $this->process[$new_value[1]] = $name; Chris@16: } Chris@0: } Chris@0: } Chris@0: catch (RequirementsException $e) { Chris@0: // The checkRequirements() call will fail when the profile module does Chris@17: // not exist on the source site, or if the required migrations have not Chris@17: // yet run. Chris@0: } Chris@0: } Chris@0: return parent::getProcess(); Chris@0: } Chris@0: Chris@0: }