You are here

public function NodeGrantDatabaseStorage::deleteNodeRecords in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/node/src/NodeGrantDatabaseStorage.php \Drupal\node\NodeGrantDatabaseStorage::deleteNodeRecords()

Remove the access records belonging to certain nodes.

Parameters

array $nids: A list of node IDs. The grant records belonging to these nodes will be deleted.

Overrides NodeGrantDatabaseStorageInterface::deleteNodeRecords

File

core/modules/node/src/NodeGrantDatabaseStorage.php, line 277
Contains \Drupal\node\NodeGrantDatabaseStorage.

Class

NodeGrantDatabaseStorage
Defines a controller class that handles the node grants system.

Namespace

Drupal\node

Code

public function deleteNodeRecords(array $nids) {
  $this->database
    ->delete('node_access')
    ->condition('nid', $nids, 'IN')
    ->execute();
}