public function detach(EventManagerInterface $events)
    {
        parent::detach($events);
        $sharedEventManager = $events->getSharedManager();
        foreach ($this->sharedListeners as $index => $item) {
            if ($sharedEventManager->detach($item['id'], $item['listener'])) {
                unset($this->sharedListeners[$index]);
            }
        }
    }
public function detach(EventManagerInterface $events)
    {
        parent::detach($events);
        $sharedEventManager = $events->getSharedManager();
        foreach ($this->sharedListeners as $index => $item) {
            if ($sharedEventManager->detach($item['id'], $item['listener'])) {
                unset($this->sharedListeners[$index]);
            }
        }
    }
{@inheritDoc}