Version 1
[yaffs-website] / web / core / modules / migrate / src / Plugin / migrate / destination / EntityBaseFieldOverride.php
diff --git a/web/core/modules/migrate/src/Plugin/migrate/destination/EntityBaseFieldOverride.php b/web/core/modules/migrate/src/Plugin/migrate/destination/EntityBaseFieldOverride.php
new file mode 100644 (file)
index 0000000..7523249
--- /dev/null
@@ -0,0 +1,26 @@
+<?php
+
+namespace Drupal\migrate\Plugin\migrate\destination;
+
+use Drupal\migrate\Row;
+
+/**
+ * Provides entity base field override plugin.
+ *
+ * @MigrateDestination(
+ *   id = "entity:base_field_override"
+ * )
+ */
+class EntityBaseFieldOverride extends EntityConfigBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function getEntityId(Row $row) {
+    $entity_type = $row->getDestinationProperty('entity_type');
+    $bundle = $row->getDestinationProperty('bundle');
+    $field_name = $row->getDestinationProperty('field_name');
+    return "$entity_type.$bundle.$field_name";
+  }
+
+}