You are here

public static function TemporaryQueryGuard::setModuleHandler in JSON:API 8

Same name and namespace in other branches
  1. 8.2 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 src/Controller/EntityResource.php
Gets a basic query for a collection.

File

src/Access/TemporaryQueryGuard.php, line 65

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