public function dispatchUntil(ActionEvent $event, callable $callback): void
    {
        foreach ($this->getListeners($event) as $listenerHandler) {
            $listener = $listenerHandler->getActionEventListener();
            $listener($event);

            if ($event->propagationIsStopped()) {
                return;
            }
            if ($callback($event) === true) {
                return;
            }
        }
    }
public function dispatchUntil(ActionEvent $event, callable $callback): void
    {
        foreach ($this->getListeners($event) as $listenerHandler) {
            $listener = $listenerHandler->getActionEventListener();
            $listener($event);

            if ($event->propagationIsStopped()) {
                return;
            }
            if ($callback($event) === true) {
                return;
            }
        }
    }
public function dispatchUntil ( ActionEvent $ event , callable $ callback ) : void { foreach ( $ this -> getListeners ( $ event ) as $ listenerHandler ) { $ listener = $ listenerHandler -> getActionEventListener ( ) ; $ listener ( $ event ) ; if ( $ event -> propagationIsStopped ( ) ) { return ; } if ( $ callback ( $ event ) === true ) { return ; } } }
Trigger an event until the given callback returns a boolean true

The callback is invoked after each listener and gets the action event as only argument
Trigger an event until the given callback returns a boolean true