You are here

function node_update_8401 in Drupal 8

Run a node access rebuild, if required.

File

core/modules/node/node.install, line 263
Install, update and uninstall functions for the node module.

Code

function node_update_8401() {

  // Get the list of node access modules.
  $modules = \Drupal::moduleHandler()
    ->getImplementations('node_grants');

  // If multilingual usage, then rebuild node access.
  if (count($modules) > 0 && \Drupal::languageManager()
    ->isMultilingual()) {
    node_access_needs_rebuild(TRUE);
  }
}