Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / modules / migrate / src / Audit / HighestIdInterface.php
diff --git a/web/core/modules/migrate/src/Audit/HighestIdInterface.php b/web/core/modules/migrate/src/Audit/HighestIdInterface.php
new file mode 100644 (file)
index 0000000..f180e46
--- /dev/null
@@ -0,0 +1,26 @@
+<?php
+
+namespace Drupal\migrate\Audit;
+
+/**
+ * Defines an interface for destination and ID maps which track a highest ID.
+ *
+ * When implemented by destination plugins, getHighestId() should return the
+ * highest ID of the destination entity type that exists in the system. So, for
+ * example, the entity:node plugin should return the highest node ID that
+ * exists, regardless of whether it was created by a migration.
+ *
+ * When implemented by an ID map, getHighestId() should return the highest
+ * migrated ID of the destination entity type.
+ */
+interface HighestIdInterface {
+
+  /**
+   * Returns the highest ID tracked by the implementing plugin.
+   *
+   * @return int
+   *   The highest ID.
+   */
+  public function getHighestId();
+
+}