protected function MigrateExecutable::progressMessage in Migrate Tools 8
Same name and namespace in other branches
- 8.5 src/MigrateExecutable.php \Drupal\migrate_tools\MigrateExecutable::progressMessage()
- 8.2 src/MigrateExecutable.php \Drupal\migrate_tools\MigrateExecutable::progressMessage()
- 8.3 src/MigrateExecutable.php \Drupal\migrate_tools\MigrateExecutable::progressMessage()
- 8.4 src/MigrateExecutable.php \Drupal\migrate_tools\MigrateExecutable::progressMessage()
Emit information on what we've done since the last feedback (or the beginning of this migration).
Parameters
bool $done:
2 calls to MigrateExecutable::progressMessage()
- MigrateExecutable::onPostImport in src/
MigrateExecutable.php - React to migration completion.
- MigrateExecutable::onPrepareRow in src/
MigrateExecutable.php - React to a new row.
File
- src/
MigrateExecutable.php, line 236 - Contains \Drupal\migrate_tools\MigrateExecutable.
Class
Namespace
Drupal\migrate_toolsCode
protected function progressMessage($done = TRUE) {
$processed = $this
->getProcessedCount();
if ($done) {
$singular_message = "Processed 1 item (@created created, @updated updated, @failures failed, @ignored ignored) - done with '@name'";
$plural_message = "Processed @numitems items (@created created, @updated updated, @failures failed, @ignored ignored) - done with '@name'";
}
else {
$singular_message = "Processed 1 item (@created created, @updated updated, @failures failed, @ignored ignored) - continuing with '@name'";
$plural_message = "Processed @numitems items (@created created, @updated updated, @failures failed, @ignored ignored) - continuing with '@name'";
}
$this->message
->display(\Drupal::translation()
->formatPlural($processed, $singular_message, $plural_message, array(
'@numitems' => $processed,
'@created' => $this
->getCreatedCount(),
'@updated' => $this
->getUpdatedCount(),
'@failures' => $this
->getFailedCount(),
'@ignored' => $this
->getIgnoredCount(),
'@name' => $this->migration
->id(),
)));
}