Commit 8419cf3d authored by Gábor Hojtsy's avatar Gábor Hojtsy

Issue #2930832 by phenaproxima, heddn, larowlan, quietone: Add isAuditable()...

Issue #2930832 by phenaproxima, heddn, larowlan, quietone: Add isAuditable() method to MigrationInterface
parent c944475c
......@@ -16,12 +16,8 @@ class IdAuditor implements AuditorInterface {
* {@inheritdoc}
*/
public function audit(MigrationInterface $migration) {
$plugin_definition = $migration->getPluginDefinition();
// If the migration does not opt into auditing, it passes.
// @todo Use $migration->isAuditable() when
// https://www.drupal.org/project/drupal/issues/2930832 is in.
if (empty($plugin_definition['audit'])) {
if (!$migration->isAuditable()) {
return AuditResult::pass($migration);
}
......
......@@ -688,4 +688,11 @@ public function getMigrationTags() {
return $this->migration_tags;
}
/**
* {@inheritdoc}
*/
public function isAuditable() {
return (bool) $this->audit;
}
}
......@@ -322,4 +322,11 @@ public function getDestinationIds();
*/
public function getMigrationTags();
/**
* Indicates if the migration is auditable.
*
* @return bool
*/
public function isAuditable();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment