ReactionExample

final readonly class \TYPO3\CMS\Reactions\Model\ReactionExample

The request the backend module shows for a reaction, so an integrator reads what to send rather than what a generic example.

Table of Contents

Methods

forFieldMap()  : self
The payload is composed of the placeholders the field map reads, so the example names the keys this reaction resolves. A map carrying none of them, every field left unset or fixed to a value, still needs a body, and gets a minimal one.
getCurlCommand()  : string
getFormattedPayload()  : string
getUrl()  : string

Methods

forFieldMap()

The payload is composed of the placeholders the field map reads, so the example names the keys this reaction resolves. A map carrying none of them, every field left unset or fixed to a value, still needs a body, and gets a minimal one.

public static forFieldMap(string $url, array $fields) : self

Placeholders are found with the pattern the reaction resolves them with, and paths are read with the same utility, so what the example offers and what the reaction accepts cannot drift apart. Where one path is the parent of another, "${a}" and "${a.b}", the parent is kept whichever comes first, since only it offers both.

Parameters

$url : string
$fields : array

Return values

self

getCurlCommand()

public getCurlCommand() : string

Return values

string

getFormattedPayload()

public getFormattedPayload() : string

Return values

string

getUrl()

public getUrl() : string

Return values

string
On this page