CreateRecordReaction implements ReactionInterface
A reaction that creates a database record based on the payload within a request.
This is a specific reaction implementation and is not considered part of the Public TYPO3 API.
Table of Contents
Interfaces
Methods
- __construct() : mixed
- getDescription() : string
- A meaningful description for the reaction
- getIconIdentifier() : string
- An icon identifier for the reaction
- getType() : string
- The reaction type, used for the registry and stored in the database
- react() : ResponseInterface
- Main method of the reaction, handling the incoming request
- replacePlaceHolders() : string
- buildResponseFromDataHandler() : ResponseInterface
- jsonResponse() : ResponseInterface
Methods
__construct()
public
__construct(ResponseFactoryInterface $responseFactory, StreamFactoryInterface $streamFactory) : mixed
Parameters
- $responseFactory : ResponseFactoryInterface
- $streamFactory : StreamFactoryInterface
getDescription()
A meaningful description for the reaction
public
static getDescription() : string
Return values
stringgetIconIdentifier()
An icon identifier for the reaction
public
static getIconIdentifier() : string
Return values
stringgetType()
The reaction type, used for the registry and stored in the database
public
static getType() : string
Return values
stringreact()
Main method of the reaction, handling the incoming request
public
react(ServerRequestInterface $request, array<string|int, mixed> $payload, ReactionInstruction $reaction) : ResponseInterface
Parameters
- $request : ServerRequestInterface
- $payload : array<string|int, mixed>
- $reaction : ReactionInstruction
Return values
ResponseInterfacereplacePlaceHolders()
public
replacePlaceHolders(mixed $value, array<string|int, mixed> $payload) : string
Parameters
- $value : mixed
- $payload : array<string|int, mixed>
only public due to tests
Return values
stringbuildResponseFromDataHandler()
protected
buildResponseFromDataHandler(DataHandler $dataHandler[, int $successCode = 200 ]) : ResponseInterface
Parameters
- $dataHandler : DataHandler
- $successCode : int = 200
Return values
ResponseInterfacejsonResponse()
protected
jsonResponse(array<string|int, mixed> $data[, int $statusCode = 200 ]) : ResponseInterface
Parameters
- $data : array<string|int, mixed>
- $statusCode : int = 200