UserReference.php
Same filename in other branches
- 9 core/modules/migrate_drupal/src/Plugin/migrate/field/d6/UserReference.php
- 9 core/modules/migrate_drupal/src/Plugin/migrate/field/d7/UserReference.php
- 10 core/modules/migrate_drupal/src/Plugin/migrate/field/d6/UserReference.php
- 10 core/modules/migrate_drupal/src/Plugin/migrate/field/d7/UserReference.php
- 11.x core/modules/migrate_drupal/src/Plugin/migrate/field/d6/UserReference.php
- 11.x core/modules/migrate_drupal/src/Plugin/migrate/field/d7/UserReference.php
Namespace
Drupal\migrate_drupal\Plugin\migrate\fieldFile
-
core/
modules/ migrate_drupal/ src/ Plugin/ migrate/ field/ UserReference.php
View source
<?php
namespace Drupal\migrate_drupal\Plugin\migrate\field;
use Drupal\migrate\Plugin\MigrationInterface;
/**
* @MigrateField(
* id = "userreference",
* core = {6},
* type_map = {
* "userreference" = "entity_reference",
* },
* source_module = "userreference",
* destination_module = "core",
* )
*/
class UserReference extends FieldPluginBase {
/**
* {@inheritdoc}
*/
public function defineValueProcessPipeline(MigrationInterface $migration, $field_name, $data) {
$process = [
'plugin' => 'sub_process',
'source' => $field_name,
'process' => [
'target_id' => [
'plugin' => 'migration_lookup',
'migration' => 'd6_user',
'source' => 'uid',
],
],
];
$migration->setProcessOfProperty($field_name, $process);
}
}
Classes
Title | Deprecated | Summary |
---|---|---|
UserReference | Plugin annotation @MigrateField( id = "userreference", core = {6}, type_map = { "userreference" = "entity_reference", }, source_module = "userreference", destination_module = "core", ) |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.