function NodeAccessRebuild::batchFinished
Same name and namespace in other branches
- 11.x core/modules/node/src/NodeAccessRebuild.php \Drupal\node\NodeAccessRebuild::batchFinished()
Implements callback_batch_finished().
Performs post-processing for \Drupal\node\NodeAccessRebuild::rebuild().
Parameters
bool $success: A boolean indicating whether the re-build process has completed.
File
-
core/
modules/ node/ src/ NodeAccessRebuild.php, line 220
Class
- NodeAccessRebuild
- Provides methods for checking and rebuilding node access permissions.
Namespace
Drupal\nodeCode
public function batchFinished(bool $success) : void {
if ($success) {
$this->messenger
->addStatus($this->t('The content access permissions have been rebuilt.'));
$this->setNeedsRebuild(FALSE);
}
else {
$this->messenger
->addError($this->t('The content access permissions have not been properly rebuilt.'));
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.