function NodeGrantDatabaseStorage::count

Same name in other branches
  1. 8.9.x core/modules/node/src/NodeGrantDatabaseStorage.php \Drupal\node\NodeGrantDatabaseStorage::count()
  2. 10 core/modules/node/src/NodeGrantDatabaseStorage.php \Drupal\node\NodeGrantDatabaseStorage::count()
  3. 11.x core/modules/node/src/NodeGrantDatabaseStorage.php \Drupal\node\NodeGrantDatabaseStorage::count()

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.