protected function MigrateExecutable::rollbackMessage in Migrate Tools 8.5
Same name and namespace in other branches
- 8 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.
Either since the last feedback or the beginning of this migration.
Parameters
bool $done: TRUE if this is the last items to rollback. Otherwise FALSE.
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 314
Class
- MigrateExecutable
- Defines a migrate executable class for drush.
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, [
'@numitems' => $rolled_back,
'@name' => $this->migration
->id(),
]));
}