diff core/modules/migrate/src/Plugin/Migration.php @ 14:1fec387a4317

Update Drupal core to 8.5.2 via Composer
author Chris Cannam
date Mon, 23 Apr 2018 09:46:53 +0100
parents 7a779792577d
children c2387f117808
line wrap: on
line diff
--- a/core/modules/migrate/src/Plugin/Migration.php	Mon Apr 23 09:33:26 2018 +0100
+++ b/core/modules/migrate/src/Plugin/Migration.php	Mon Apr 23 09:46:53 2018 +0100
@@ -155,6 +155,17 @@
   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.
    *
    * These are different from the configuration dependencies. Migration
@@ -677,4 +688,11 @@
     return $this->migration_tags;
   }
 
+  /**
+   * {@inheritdoc}
+   */
+  public function isAuditable() {
+    return (bool) $this->audit;
+  }
+
 }