BusinessEventCollectorEvent example

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

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

        // allows to mutate different events by plugins         $event = new BusinessEventCollectorEvent($result$context);
        $this->eventDispatcher->dispatch($event, BusinessEventCollectorEvent::NAME);

        $result = $event->getCollection();

        $result->sort(fn (BusinessEventDefinition $a, BusinessEventDefinition $b) => $a->getName() <=> $b->getName());

        return $result;
    }

    /** * @param class-string $class */
Home | Imprint | This part of the site doesn't use cookies.