\Drupal\strata\Event\Webhook WebhookSubscriber

Turns every Strata event into queued webhook deliveries.

One listener for every event rather than one per event, because a webhook subscription filters by name itself and the dispatcher does not care which event it is queueing. A new event on StrataEvents is therefore deliverable without this class changing.

Summary

Methods
Properties
Constants
__construct
getSubscribedEvents
onEvent
No public properties found
No public constants found
No protected methods found
No protected properties found
No protected constants found
No private methods found
dispatcher
No private constants found

Properties

$dispatcher

$dispatcher : \Drupal\strata\Event\Webhook\WebhookDispatcher

Type

WebhookDispatcher

Methods

__construct()

__construct(\Drupal\strata\Event\Webhook\WebhookDispatcher  $dispatcher) : mixed

Constructs a subscriber.

Parameters

\Drupal\strata\Event\Webhook\WebhookDispatcher $dispatcher

Queues the deliveries.

Returns

mixed —

getSubscribedEvents()

getSubscribedEvents() : array<string,string>

{@inheritdoc}

Returns

array

Event name keyed to the method that handles it.

onEvent()

onEvent(\Drupal\strata\Event\StrataEvent  $event) : void

Queues one event.

Parameters

\Drupal\strata\Event\StrataEvent $event

The event.

Returns

void —