fetchAppEvents example

private readonly BusinessEventRegistry $registry,
        private readonly EventDispatcherInterface $eventDispatcher,
        private readonly Connection $connection
    ) {
    }

    public function collect(Context $context): BusinessEventCollectorResponse
    {
        $events = $this->registry->getClasses();

        $result = new BusinessEventCollectorResponse();
        $result = $this->fetchAppEvents($result);

        foreach ($events as $class) {
            $definition = $this->define($class);

            if (!$definition) {
                continue;
            }
            $result->set($definition->getName()$definition);
        }

        // allows to mutate different events by plugins
Home | Imprint | This part of the site doesn't use cookies.