You are here

public static function TemporaryQueryGuard::setModuleHandler in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/jsonapi/src/Access/TemporaryQueryGuard.php \Drupal\jsonapi\Access\TemporaryQueryGuard::setModuleHandler()
  2. 10 core/modules/jsonapi/src/Access/TemporaryQueryGuard.php \Drupal\jsonapi\Access\TemporaryQueryGuard::setModuleHandler()

Sets the module handler.

This must be called before calling ::applyAccessControls().

Parameters

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.

1 call to TemporaryQueryGuard::setModuleHandler()
EntityResource::getCollectionQuery in core/modules/jsonapi/src/Controller/EntityResource.php
Gets a basic query for a collection.

File

core/modules/jsonapi/src/Access/TemporaryQueryGuard.php, line 74

Class

TemporaryQueryGuard
Adds sufficient access control to collection queries.

Namespace

Drupal\jsonapi\Access

Code

public static function setModuleHandler(ModuleHandlerInterface $module_handler) {
  static::$moduleHandler = $module_handler;
}