function acquia_contenthub_reexport_finished in Acquia Content Hub 8
Batch finished function for re-export entities.
Parameters
bool $success: TRUE if succeeded, FALSE otherwise.
mixed $results: The results array.
mixed $operations: The operations array.
1 string reference to 'acquia_contenthub_reexport_finished'
- ContentHubReindex::reExportEntitiesAfterReindex in src/
Controller/ ContentHubReindex.php - Implements Batch API to re-export entities after re-indexing.
File
- ./
acquia_contenthub.module, line 269 - Contains acquia_contenthub.module.
Code
function acquia_contenthub_reexport_finished($success, $results, $operations) {
if ($success) {
$message = \Drupal::translation()
->formatPlural(count($results), 'One entity processed.', '@count entities processed.');
/** @var \Drupal\acquia_contenthub\Controller\ContentHubReindex $reindex */
$reindex = \Drupal::service('acquia_contenthub.acquia_contenthub_reindex');
$reindex
->setReindexStateNone();
}
else {
$message = t('Finished with an error.');
}
\Drupal::messenger()
->addStatus($message);
}