function NodeGrantDatabaseStorageInterface::alterQuery

Same name and namespace in other branches
  1. 9 core/modules/node/src/NodeGrantDatabaseStorageInterface.php \Drupal\node\NodeGrantDatabaseStorageInterface::alterQuery()
  2. 8.9.x core/modules/node/src/NodeGrantDatabaseStorageInterface.php \Drupal\node\NodeGrantDatabaseStorageInterface::alterQuery()
  3. 10 core/modules/node/src/NodeGrantDatabaseStorageInterface.php \Drupal\node\NodeGrantDatabaseStorageInterface::alterQuery()

Alters a query when node access is required.

Parameters

mixed $query: Query that is being altered.

array $tables: A list of tables that need to be part of the alter.

string $operation: The operation to be performed on the node. Possible values are:

  • "view"
  • "update"
  • "delete"
  • "create"

\Drupal\Core\Session\AccountInterface $account: A user object representing the user for whom the operation is to be performed.

string $base_table: The base table of the query.

Return value

int Status of the access check.

File

core/modules/node/src/NodeGrantDatabaseStorageInterface.php, line 48

Class

NodeGrantDatabaseStorageInterface
Provides an interface for node access grant storage.

Namespace

Drupal\node

Code

public function alterQuery($query, array $tables, $operation, AccountInterface $account, $base_table);

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