‪TYPO3CMS  ‪main
T3docs\Examples\Reaction\ExampleReactionType Class Reference
Inheritance diagram for T3docs\Examples\Reaction\ExampleReactionType:
TYPO3\CMS\Reactions\Reaction\ReactionInterface

Public Member Functions

 __construct (private readonly Registry $registry, private readonly ResponseFactoryInterface $responseFactory, private readonly StreamFactoryInterface $streamFactory,)
 
 react (ServerRequestInterface $request, array $payload, ReactionInstruction $reaction)
 

Static Public Member Functions

static getType ()
 
static getDescription ()
 
static getIconIdentifier ()
 

Private Member Functions

 updateRegistryEntry (int $id)
 
 jsonResponse (array $data, int $statusCode=201)
 

Private Attributes

const REGISTRY_KEY = 'changed_ids'
 

Detailed Description

Definition at line 15 of file _ExampleReactionType.php.

Constructor & Destructor Documentation

◆ __construct()

T3docs\Examples\Reaction\ExampleReactionType::__construct ( private readonly Registry  $registry,
private readonly ResponseFactoryInterface  $responseFactory,
private readonly StreamFactoryInterface  $streamFactory 
)

Definition at line 19 of file _ExampleReactionType.php.

Member Function Documentation

◆ getDescription()

static T3docs\Examples\Reaction\ExampleReactionType::getDescription ( )
static

A meaningful description for the reaction

Implements TYPO3\CMS\Reactions\Reaction\ReactionInterface.

Definition at line 30 of file _ExampleReactionType.php.

◆ getIconIdentifier()

static T3docs\Examples\Reaction\ExampleReactionType::getIconIdentifier ( )
static

An icon identifier for the reaction

Implements TYPO3\CMS\Reactions\Reaction\ReactionInterface.

Definition at line 35 of file _ExampleReactionType.php.

◆ getType()

static T3docs\Examples\Reaction\ExampleReactionType::getType ( )
static

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

Implements TYPO3\CMS\Reactions\Reaction\ReactionInterface.

Definition at line 25 of file _ExampleReactionType.php.

◆ jsonResponse()

T3docs\Examples\Reaction\ExampleReactionType::jsonResponse ( array  $data,
int  $statusCode = 201 
)
private

◆ react()

T3docs\Examples\Reaction\ExampleReactionType::react ( ServerRequestInterface  $request,
array  $payload,
ReactionInstruction  $reaction 
)

◆ updateRegistryEntry()

T3docs\Examples\Reaction\ExampleReactionType::updateRegistryEntry ( int  $id)
private

Member Data Documentation

◆ REGISTRY_KEY

const T3docs\Examples\Reaction\ExampleReactionType::REGISTRY_KEY = 'changed_ids'
private

Definition at line 17 of file _ExampleReactionType.php.