You are here

function _node_access_rebuild_batch_finished in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/node/node.module \_node_access_rebuild_batch_finished()
  2. 6 modules/node/node.module \_node_access_rebuild_batch_finished()
  3. 7 modules/node/node.module \_node_access_rebuild_batch_finished()
  4. 9 core/modules/node/node.module \_node_access_rebuild_batch_finished()

Implements callback_batch_finished().

Performs post-processing for node_access_rebuild().

Parameters

bool $success: A boolean indicating whether the re-build process has completed.

array $results: An array of results information.

array $operations: An array of function calls (not used in this function).

Related topics

1 string reference to '_node_access_rebuild_batch_finished'
node_access_rebuild in core/modules/node/node.module
Rebuilds the node access database.

File

core/modules/node/node.module, line 1180
The core module that allows content to be submitted to the site.

Code

function _node_access_rebuild_batch_finished($success, $results, $operations) {
  if ($success) {
    \Drupal::messenger()
      ->addStatus(t('The content access permissions have been rebuilt.'));
    node_access_needs_rebuild(FALSE);
  }
  else {
    \Drupal::messenger()
      ->addError(t('The content access permissions have not been properly rebuilt.'));
  }
}