‪TYPO3CMS  ‪main
TYPO3\CMS\Webhooks\DependencyInjection\WebhookCompilerPass Class Reference
Inheritance diagram for TYPO3\CMS\Webhooks\DependencyInjection\WebhookCompilerPass:

Public Member Functions

 __construct (private readonly string $tagName)
 process (ContainerBuilder $container)

Protected Member Functions

 getParameterType (string $serviceName, Definition $definition, string $method='createFromEvent')

Private Member Functions

 getReflectionMethod (Definition $definition, string $method)

Private Attributes

ContainerBuilder $container

Detailed Description

A compiler pass to wire Messages which can be used as "webhook" into the webhook registry when needed.

Also, if the Message has an Event name as identifier, we automatically register the MessageListener to the ListenerProvider as well, and the MessageFactory can then automatically create the message for us.

What does this mean? If your Message class has one object within the __construct() method, we assume this is an Event class, and we connect to it.

Definition at line 39 of file WebhookCompilerPass.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Webhooks\DependencyInjection\WebhookCompilerPass::__construct ( private readonly string  $tagName)

Definition at line 42 of file WebhookCompilerPass.php.

Member Function Documentation

◆ getParameterType()

TYPO3\CMS\Webhooks\DependencyInjection\WebhookCompilerPass::getParameterType ( string  $serviceName,
Definition  $definition,
string  $method = 'createFromEvent' 

Derives the class type of the first argument of a given method.

Definition at line 88 of file WebhookCompilerPass.php.

References TYPO3\CMS\Webhooks\DependencyInjection\WebhookCompilerPass\getReflectionMethod().

Referenced by TYPO3\CMS\Webhooks\DependencyInjection\WebhookCompilerPass\process().

◆ getReflectionMethod()

TYPO3\CMS\Webhooks\DependencyInjection\WebhookCompilerPass::getReflectionMethod ( Definition  $definition,
string  $method 

Definition at line 120 of file WebhookCompilerPass.php.

Referenced by TYPO3\CMS\Webhooks\DependencyInjection\WebhookCompilerPass\getParameterType().

◆ process()

TYPO3\CMS\Webhooks\DependencyInjection\WebhookCompilerPass::process ( ContainerBuilder  $container)

Member Data Documentation

◆ $container

ContainerBuilder TYPO3\CMS\Webhooks\DependencyInjection\WebhookCompilerPass::$container