isAuditable example


class IdAuditor implements AuditorInterface {

  use StringTranslationTrait;

  /** * {@inheritdoc} */
  public function audit(MigrationInterface $migration) {
    // If the migration does not opt into auditing, it passes.     if (!$migration->isAuditable()) {
      return AuditResult::pass($migration);
    }

    $interface = HighestIdInterface::class;

    $destination = $migration->getDestinationPlugin();
    if (!$destination instanceof HighestIdInterface) {
      throw new AuditException($migration, "Destination does not implement $interface");
    }

    $id_map = $migration->getIdMap();
    
Home | Imprint | This part of the site doesn't use cookies.