Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / modules / migrate / src / Plugin / Migration.php
index 3bbe38ad7425cad92f7d8a57bc5f6913f1fd6483..cc8d804da5e534c9211955a5b11df104730607eb 100644 (file)
@@ -154,6 +154,17 @@ class Migration extends PluginBase implements MigrationInterface, RequirementsIn
    */
   protected $migration_tags = [];
 
+  /**
+   * Whether the migration is auditable.
+   *
+   * If set to TRUE, the migration's IDs will be audited. This means that, if
+   * the highest destination ID is greater than the highest source ID, a warning
+   * will be displayed that entities might be overwritten.
+   *
+   * @var bool
+   */
+  protected $audit = FALSE;
+
   /**
    * These migrations, if run, must be executed before this migration.
    *
@@ -677,4 +688,11 @@ class Migration extends PluginBase implements MigrationInterface, RequirementsIn
     return $this->migration_tags;
   }
 
+  /**
+   * {@inheritdoc}
+   */
+  public function isAuditable() {
+    return (bool) $this->audit;
+  }
+
 }