function _node_access_rebuild_batch_finished

Same name in other branches
  1. 7.x modules/node/node.module \_node_access_rebuild_batch_finished()
  2. 9 core/modules/node/node.module \_node_access_rebuild_batch_finished()
  3. 10 core/modules/node/node.module \_node_access_rebuild_batch_finished()
  4. 11.x 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 1364

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.'));
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.