You are here

public function QueryBase::accessCheck in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Entity/Query/QueryBase.php \Drupal\Core\Entity\Query\QueryBase::accessCheck()
  2. 9 core/lib/Drupal/Core/Entity/Query/QueryBase.php \Drupal\Core\Entity\Query\QueryBase::accessCheck()

Enables or disables access checking for this query.

Parameters

bool $access_check: (optional) Whether access check is requested or not. Defaults to TRUE.

Return value

$this

Overrides QueryInterface::accessCheck

File

core/lib/Drupal/Core/Entity/Query/QueryBase.php, line 252

Class

QueryBase
The base entity query class.

Namespace

Drupal\Core\Entity\Query

Code

public function accessCheck($access_check = TRUE) {
  $this->accessCheck = $access_check;
  return $this;
}