Chris@0: init) { Chris@0: $this->init = TRUE; Chris@0: $definition['source'] = [ Chris@0: 'entity_type' => 'user', Chris@0: 'ignore_map' => TRUE, Chris@0: ] + $this->source; Chris@0: $definition['destination']['plugin'] = 'null'; Chris@14: $definition['idMap']['plugin'] = 'null'; Chris@0: if (\Drupal::moduleHandler()->moduleExists('field')) { Chris@0: $definition['source']['plugin'] = 'd7_field_instance'; Chris@0: $field_migration = $this->migrationPluginManager->createStubMigration($definition); Chris@0: foreach ($field_migration->getSourcePlugin() as $row) { Chris@0: $field_name = $row->getSourceProperty('field_name'); Chris@0: $field_type = $row->getSourceProperty('type'); Chris@0: if (empty($field_type)) { Chris@0: continue; Chris@0: } Chris@0: if ($this->fieldPluginManager->hasDefinition($field_type)) { Chris@0: if (!isset($this->fieldPluginCache[$field_type])) { Chris@0: $this->fieldPluginCache[$field_type] = $this->fieldPluginManager->createInstance($field_type, [], $this); Chris@0: } Chris@0: $info = $row->getSource(); Chris@0: $this->fieldPluginCache[$field_type] Chris@0: ->processFieldValues($this, $field_name, $info); Chris@0: } Chris@0: else { Chris@0: if ($this->cckPluginManager->hasDefinition($field_type)) { Chris@0: if (!isset($this->cckPluginCache[$field_type])) { Chris@0: $this->cckPluginCache[$field_type] = $this->cckPluginManager->createInstance($field_type, [], $this); Chris@0: } Chris@0: $info = $row->getSource(); Chris@0: $this->cckPluginCache[$field_type] Chris@0: ->processCckFieldValues($this, $field_name, $info); Chris@0: } Chris@0: else { Chris@0: $this->process[$field_name] = $field_name; Chris@0: } Chris@0: } Chris@0: } Chris@0: } Chris@0: try { Chris@0: $definition['source']['plugin'] = 'profile_field'; Chris@0: $profile_migration = $this->migrationPluginManager->createStubMigration($definition); Chris@0: // Ensure that Profile is enabled in the source DB. Chris@0: $profile_migration->checkRequirements(); Chris@0: foreach ($profile_migration->getSourcePlugin() as $row) { Chris@0: $name = $row->getSourceProperty('name'); Chris@0: $this->process[$name] = $name; Chris@0: } Chris@0: } Chris@0: catch (RequirementsException $e) { Chris@0: // The checkRequirements() call will fail when the profile module does Chris@0: // not exist on the source site. Chris@0: } Chris@0: } Chris@0: return parent::getProcess(); Chris@0: } Chris@0: Chris@0: }