You are here

public function MigrationController::executeStepWithCounts in Workbench Moderation to Content Moderation 8.2

Executes all migrations for a particular step of the wbm2cm process and returns imported counts for each executed migration.

Parameters

string $which: The step to execute. Can be one of 'save', 'clear', or 'restore'.

Return value

array The imported counts, keyed by the affected entity type ID.

1 call to MigrationController::executeStepWithCounts()
MigrationController::executeStepWithMessages in src/MigrationController.php
Executes all migrations for a particular step of the wbm2cm process and returns imported counts for each executed migration in a human-friendly format.

File

src/MigrationController.php, line 119

Class

MigrationController

Namespace

Drupal\wbm2cm

Code

public function executeStepWithCounts($which) {
  $counts = [];
  foreach ($this
    ->executeStep($which) as $migration) {
    $entity_type = $migration
      ->getDerivativeId();
    $counts[$entity_type] = $migration
      ->getIdMap()
      ->importedCount();
  }
  return $counts;
}