You are here

public static function TemporaryQueryGuard::setFieldManager in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/jsonapi/src/Access/TemporaryQueryGuard.php \Drupal\jsonapi\Access\TemporaryQueryGuard::setFieldManager()

Sets the entity field manager.

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

Parameters

\Drupal\Core\Entity\EntityFieldManagerInterface $field_manager: The entity field manager.

1 call to TemporaryQueryGuard::setFieldManager()
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 62

Class

TemporaryQueryGuard
Adds sufficient access control to collection queries.

Namespace

Drupal\jsonapi\Access

Code

public static function setFieldManager(EntityFieldManagerInterface $field_manager) {
  static::$fieldManager = $field_manager;
}