class NodeReference

Same name in other branches
  1. 9 core/modules/migrate_drupal/src/Plugin/migrate/field/d6/NodeReference.php \Drupal\migrate_drupal\Plugin\migrate\field\d6\NodeReference
  2. 9 core/modules/migrate_drupal/src/Plugin/migrate/field/NodeReference.php \Drupal\migrate_drupal\Plugin\migrate\field\NodeReference
  3. 9 core/modules/migrate_drupal/src/Plugin/migrate/field/d7/NodeReference.php \Drupal\migrate_drupal\Plugin\migrate\field\d7\NodeReference
  4. 10 core/modules/migrate_drupal/src/Plugin/migrate/field/d6/NodeReference.php \Drupal\migrate_drupal\Plugin\migrate\field\d6\NodeReference
  5. 10 core/modules/migrate_drupal/src/Plugin/migrate/field/d7/NodeReference.php \Drupal\migrate_drupal\Plugin\migrate\field\d7\NodeReference
  6. 11.x core/modules/migrate_drupal/src/Plugin/migrate/field/d6/NodeReference.php \Drupal\migrate_drupal\Plugin\migrate\field\d6\NodeReference
  7. 11.x core/modules/migrate_drupal/src/Plugin/migrate/field/d7/NodeReference.php \Drupal\migrate_drupal\Plugin\migrate\field\d7\NodeReference

Plugin annotation


@MigrateField(
  id = "nodereference",
  core = {6},
  type_map = {
    "nodereference" = "entity_reference",
  },
  source_module = "nodereference",
  destination_module = "core",
)

Hierarchy

Expanded class hierarchy of NodeReference

4 string references to 'NodeReference'
MigrationProvidersExistTest::testFieldProvidersExist in core/modules/migrate/tests/src/Kernel/Plugin/MigrationProvidersExistTest.php
Tests that modules exist for all field plugins.
MultilingualReviewPageTest::getAvailablePaths in core/modules/migrate_drupal_ui/tests/src/Functional/d6/MultilingualReviewPageTest.php
Gets the available upgrade paths.
NoMultilingualReviewPageTest::getAvailablePaths in core/modules/migrate_drupal_ui/tests/src/Functional/d6/NoMultilingualReviewPageTest.php
Gets the available upgrade paths.
Upgrade6Test::getAvailablePaths in core/modules/migrate_drupal_ui/tests/src/Functional/d6/Upgrade6Test.php
Gets the available upgrade paths.

File

core/modules/migrate_drupal/src/Plugin/migrate/field/NodeReference.php, line 18

Namespace

Drupal\migrate_drupal\Plugin\migrate\field
View source
class NodeReference extends FieldPluginBase {
    
    /**
     * {@inheritdoc}
     */
    public function defineValueProcessPipeline(MigrationInterface $migration, $field_name, $data) {
        $process = [
            'plugin' => 'sub_process',
            'source' => $field_name,
            'process' => [
                'target_id' => [
                    'plugin' => 'get',
                    'source' => 'nid',
                ],
            ],
        ];
        $migration->setProcessOfProperty($field_name, $process);
    }

}

Members

Title Sort descending Deprecated Modifiers Object type Summary Overriden Title Overrides
FieldPluginBase::alterFieldFormatterMigration public function Apply any custom processing to the field formatter migration. Overrides MigrateFieldInterface::alterFieldFormatterMigration
FieldPluginBase::alterFieldInstanceMigration public function Apply any custom processing to the field instance migration. Overrides MigrateFieldInterface::alterFieldInstanceMigration 2
FieldPluginBase::alterFieldMigration public function Apply any custom processing to the field migration. Overrides MigrateFieldInterface::alterFieldMigration
FieldPluginBase::alterFieldWidgetMigration public function Apply any custom processing to the field widget migration. Overrides MigrateFieldInterface::alterFieldWidgetMigration
FieldPluginBase::getFieldFormatterMap public function Get a map between D6 formatters and D8 formatters for this field type. Overrides MigrateFieldInterface::getFieldFormatterMap 12
FieldPluginBase::getFieldFormatterType public function Get the field formatter type from the source. Overrides MigrateFieldInterface::getFieldFormatterType 1
FieldPluginBase::getFieldType public function Computes the destination type of a migrated field. Overrides MigrateFieldInterface::getFieldType 6
FieldPluginBase::getFieldWidgetMap public function Get a map between D6 and D8 widgets for this field type. Overrides MigrateFieldInterface::getFieldWidgetMap 10
FieldPluginBase::getFieldWidgetType public function Get the field widget type from the source. Overrides MigrateFieldInterface::getFieldWidgetType 1
FieldPluginBase::processField Deprecated public function Alters the migration for field definitions.
FieldPluginBase::processFieldFormatter Deprecated public function Alter field formatter migration.
FieldPluginBase::processFieldInstance Deprecated public function Alert field instance migration.
FieldPluginBase::processFieldValues Deprecated public function Defines the process pipeline for field values.
FieldPluginBase::processFieldWidget Deprecated public function Alter field widget migration.
NodeReference::defineValueProcessPipeline public function Apply any custom processing to the field bundle migrations. Overrides FieldPluginBase::defineValueProcessPipeline
PluginInspectionInterface::getPluginDefinition public function Gets the definition of the plugin implementation. 6
PluginInspectionInterface::getPluginId public function Gets the plugin_id of the plugin instance. 2

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.