Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. AuditResult.php

function AuditResult::__construct

AuditResult constructor.

Parameters

\Drupal\migrate\Plugin\MigrationInterface $migration: The audited migration.

bool $status: The result of the audit (TRUE if passed, FALSE otherwise).

string[] $reasons: (optional) The reasons why the migration passed or failed the audit.

File

core/modules/migrate/src/Audit/AuditResult.php, line 44

Class

AuditResult
Encapsulates the result of a migration audit.

Namespace

Drupal\migrate\Audit

Code

public function __construct(MigrationInterface $migration, $status, array $reasons = []) {
    if (!is_bool($status)) {
        throw new \InvalidArgumentException('Audit results must have a boolean status.');
    }
    $this->migration = $migration;
    $this->status = $status;
    array_walk($reasons, [
        $this,
        'addReason',
    ]);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal