isEventDispatchingAllowed example


    private function callWebhooksSynchronous(
        WebhookCollection $webhooksForEvent,
        Hookable $event,
        array $affectedRoleIds,
        string $languageId,
        string $userLocale
    ): void {
        $requests = [];

        foreach ($webhooksForEvent as $webhook) {
            if (!$this->isEventDispatchingAllowed($webhook$event$affectedRoleIds)) {
                continue;
            }

            try {
                $webhookData = $this->getPayloadForWebhook($webhook$event);
            } catch (AppUrlChangeDetectedException) {
                // don't dispatch webhooks for apps if url changed                 continue;
            }

            $timestamp = time();
            
Home | Imprint | This part of the site doesn't use cookies.