You are here

public function NodeAccess::getNidsForAccessRebuild in Permissions by Term 8.2

1 call to NodeAccess::getNidsForAccessRebuild()
NodeAccess::rebuildAccess in src/Service/NodeAccess.php

File

src/Service/NodeAccess.php, line 165

Class

NodeAccess
Class NodeAccess

Namespace

Drupal\permissions_by_term\Service

Code

public function getNidsForAccessRebuild() : array {

  //    We do not use taxonomy_index table here. The taxonomy_index table is
  //    populated only, if an node is published. PbT has fetched all term
  //    id to node id relations via this table. That's wrong! Because Permission
  //    by Term is managing also permissions for unpublished nodes.
  return $this->database
    ->select('node', 'n')
    ->fields('n', [
    'nid',
  ])
    ->execute()
    ->fetchCol();
}