Version 1
[yaffs-website] / web / core / modules / migrate / tests / modules / migrate_events_test / src / Plugin / migrate / destination / DummyDestination.php
diff --git a/web/core/modules/migrate/tests/modules/migrate_events_test/src/Plugin/migrate/destination/DummyDestination.php b/web/core/modules/migrate/tests/modules/migrate_events_test/src/Plugin/migrate/destination/DummyDestination.php
new file mode 100644 (file)
index 0000000..415d000
--- /dev/null
@@ -0,0 +1,39 @@
+<?php
+
+namespace Drupal\migrate_events_test\Plugin\migrate\destination;
+
+use Drupal\migrate\Plugin\MigrationInterface;
+use Drupal\migrate\Plugin\migrate\destination\DestinationBase;
+use Drupal\migrate\Row;
+
+/**
+ * @MigrateDestination(
+ *   id = "dummy",
+ *   requirements_met = true
+ * )
+ */
+class DummyDestination extends DestinationBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getIds() {
+    $ids['value']['type'] = 'string';
+    return $ids;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function fields(MigrationInterface $migration = NULL) {
+    return ['value' => 'Dummy value'];
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function import(Row $row, array $old_destination_id_values = []) {
+    return ['value' => $row->getDestinationProperty('value')];
+  }
+
+}