You are here

public function NodeGrantDatabaseStorage::count in Drupal 8

Same name and namespace in other branches
  1. 9 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 273

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();
}