public function XmlSitemapGenerator::rebuildBatchFinished in XML sitemap 8
Same name and namespace in other branches
- 2.x src/XmlSitemapGenerator.php \Drupal\xmlsitemap\XmlSitemapGenerator::rebuildBatchFinished()
Batch callback; sitemap rebuild finished.
Parameters
bool $success: Checks if regeneration batch process was successful.
array $results: Results for the regeneration process.
array $operations: Operations performed.
int $elapsed: Elapsed. Time elapsed.
Overrides XmlSitemapGeneratorInterface::rebuildBatchFinished
File
- src/
XmlSitemapGenerator.php, line 582
Class
- XmlSitemapGenerator
- XmlSitemap generator service class.
Namespace
Drupal\xmlsitemapCode
public function rebuildBatchFinished($success, array $results, array $operations, $elapsed) {
if ($success && !$this->state
->get('xmlsitemap_rebuild_needed', FALSE)) {
$this->messenger
->addStatus($this
->t('The sitemap links were rebuilt.'));
}
else {
$this->messenger
->addError($this
->t('The sitemap links were not successfully rebuilt.'));
}
}