public function restoreEventListeners(string $event)
    {
        if (!\array_key_exists($event, $this->disabledListeners) || empty($this->disabledListeners[$event])) {
            return;
        }

        $eventManager = $this->getEventManager();

        /* @var EventSubscriber[] $listeners */
        $listeners = $this->disabledListeners[$event];
        foreach ($listeners as $listener) {
            $eventManager->addEventListener($event, $listener);
        }

        $this->disabledListeners[$event] = [];
    }
public function restoreEventListeners(string $event)
    {
        if (!\array_key_exists($event, $this->disabledListeners) || empty($this->disabledListeners[$event])) {
            return;
        }

        $eventManager = $this->getEventManager();

        /* @var EventSubscriber[] $listeners */
        $listeners = $this->disabledListeners[$event];
        foreach ($listeners as $listener) {
            $eventManager->addEventListener($event, $listener);
        }

        $this->disabledListeners[$event] = [];
    }
public function restoreEventListeners ( string $ event ) { if ( ! \ array_key_exists ( $ event , $ this -> disabledListeners ) || empty ( $ this -> disabledListeners [ $ event ] ) ) { return ; } $ eventManager = $ this -> getEventManager ( ) ; /* @var EventSubscriber[] $listeners */ $ listeners = $ this -> disabledListeners [ $ event ] ; foreach ( $ listeners as $ listener ) { $ eventManager -> addEventListener ( $ event , $ listener ) ; } $ this -> disabledListeners [ $ event ] = [ ] ; }
Restore disabled listeners for an event.

@param string $event
Restore disabled listeners for an event .