function TemporaryQueryGuard::setModuleHandler

Same name 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()
  3. 11.x 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;
}

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