public static function ConvertNodes::convertNodesFinishedCallback in Convert Nodes 8
File
- src/
ConvertNodes.php, line 302
Class
- ConvertNodes
- ConvertNodes.
Namespace
Drupal\convert_nodesCode
public static function convertNodesFinishedCallback($success, $results, $operations) {
// The 'success' parameter means no fatal PHP errors were detected. All
// other error management should be handled using 'results'.
if ($success) {
$message = \Drupal::translation()
->formatPlural(count($results), 'One operation processed.', '@count operations processed.');
}
else {
$message = t('Finished with an error.');
}
\Drupal::messenger()
->addStatus($message);
}