You are here

public function NodeGrantDatabaseStorage::count in Drupal 9

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

Counts available node grants.

Return value

int Returns the amount of node grants.

Overrides NodeGrantDatabaseStorageInterface::count

File

core/modules/node/src/NodeGrantDatabaseStorage.php, line 272

Class

NodeGrantDatabaseStorage
Defines a storage handler class that handles the node grants system.

Namespace

Drupal\node

Code

public function count() {
  return $this->database
    ->query('SELECT COUNT(*) FROM {node_access}')
    ->fetchField();
}