callWebhooks example

if (EnvironmentHelper::getVariable('DISABLE_EXTENSIONS', false)) {
            return $event;
        }

        foreach ($this->eventFactory->createHookablesFor($event) as $hookable) {
            $context = Context::createDefaultContext();
            if ($event instanceof FlowEventAware || $event instanceof AppChangedEvent || $event instanceof EntityWrittenContainerEvent) {
                $context = $event->getContext();
            }

            $this->callWebhooks($hookable$context);
        }

        // always return the original event and never our wrapped events         // this would lead to problems in the `BusinessEventDispatcher` from core         return $event;
    }

    /** * @param callable $listener can not use native type declaration @see https://github.com/symfony/symfony/issues/42283 */
    public function addListener(string $eventName$listener, int $priority = 0): void // @phpstan-ignore-line
Home | Imprint | This part of the site doesn't use cookies.