protected function MigrateExecutable::rollbackMessage in Migrate Tools 8
Same name and namespace in other branches
- 8.5 src/MigrateExecutable.php \Drupal\migrate_tools\MigrateExecutable::rollbackMessage()
- 8.2 src/MigrateExecutable.php \Drupal\migrate_tools\MigrateExecutable::rollbackMessage()
- 8.3 src/MigrateExecutable.php \Drupal\migrate_tools\MigrateExecutable::rollbackMessage()
- 8.4 src/MigrateExecutable.php \Drupal\migrate_tools\MigrateExecutable::rollbackMessage()
Emit information on what we've done since the last feedback (or the beginning of this migration).
Parameters
bool $done:
2 calls to MigrateExecutable::rollbackMessage()
- MigrateExecutable::onPostRollback in src/
MigrateExecutable.php - React to rollback completion.
- MigrateExecutable::onPostRowDelete in src/
MigrateExecutable.php - React to item rollback.
File
- src/
MigrateExecutable.php, line 273 - Contains \Drupal\migrate_tools\MigrateExecutable.
Class
Namespace
Drupal\migrate_toolsCode
protected function rollbackMessage($done = TRUE) {
$rolled_back = $this
->getRollbackCount();
if ($done) {
$singular_message = "Rolled back 1 item - done with '@name'";
$plural_message = "Rolled back @numitems items - done with '@name'";
}
else {
$singular_message = "Rolled back 1 item - continuing with '@name'";
$plural_message = "Rolled back @numitems items - continuing with '@name'";
}
$this->message
->display(\Drupal::translation()
->formatPlural($rolled_back, $singular_message, $plural_message, array(
'@numitems' => $rolled_back,
'@name' => $this->migration
->id(),
)));
}