You are here

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

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

File

src/Access/TemporaryQueryGuard.php, line 53

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