CreateRecordReaction

class \TYPO3\CMS\Reactions\Reaction\CreateRecordReaction

Implements
ReactionInterface

A reaction that creates a database record based on the payload within a request.

Table of Contents

Interfaces

ReactionInterface

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

string

getIconIdentifier()

An icon identifier for the reaction

public static getIconIdentifier() : string

Return values

string

getType()

The reaction type, used for the registry and stored in the database

public static getType() : string

Return values

string

react()

Main method of the reaction, handling the incoming request

public react(ServerRequestInterface $request, array $payload, ReactionInstruction $reaction) : ResponseInterface

Parameters

$request : ServerRequestInterface
$payload : array
$reaction : ReactionInstruction

Return values

ResponseInterface

replacePlaceHolders()

public replacePlaceHolders(mixed $value, array $payload) : string

Parameters

$value : mixed
$payload : array

Return values

string

buildResponseFromDataHandler()

protected buildResponseFromDataHandler(DataHandler $dataHandler[, int $successCode = 200 ]) : ResponseInterface

Parameters

$dataHandler : DataHandler
$successCode : int = 200

Return values

ResponseInterface

jsonResponse()

protected jsonResponse(array $data[, int $statusCode = 200 ]) : ResponseInterface

Parameters

$data : array
$statusCode : int = 200

Return values

ResponseInterface
On this page