You are here

public function AddReminder::process in JSON:API Resources 8

Process the resource request.

Parameters

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

\Drupal\jsonapi\JsonApiResource\JsonApiDocumentTopLevel $document: The deserialized request document.

Return value

\Drupal\jsonapi\ResourceResponse The response.

Throws

\Symfony\Component\HttpKernel\Exception\ConflictHttpException Thrown when the entity to be created already exists.

\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException Thrown if the storage handler couldn't be loaded.

\Drupal\Core\Entity\EntityStorageException Thrown if the entity could not be saved.

File

tests/modules/jsonapi_resources_test/src/Resource/AddReminder.php, line 68

Class

AddReminder
Processes a request to create a reminder node for a user.

Namespace

Drupal\jsonapi_resources_test\Resource

Code

public function process(Request $request, JsonApiDocumentTopLevel $document) : ResourceResponse {
  return $this
    ->processEntityCreation($request, $document);
}