You are here

protected function ResourceBase::getDocumentFromRequest in JSON:API Resources 8

Get the document from the request.

Parameters

\Symfony\Component\HttpFoundation\Request $request: The request.

Return value

\Drupal\jsonapi\JsonApiResource\JsonApiDocumentTopLevel The document.

File

src/Resource/ResourceBase.php, line 81

Class

ResourceBase
Defines basic functionality for a JSON:API Resource.

Namespace

Drupal\jsonapi_resources\Resource

Code

protected function getDocumentFromRequest(Request $request) : JsonApiDocumentTopLevel {
  return $this->documentExtractor
    ->getDocument($request);
}