src/Controller/Plugin/Notification.php
public function setListener($listener)
    {
        $listener->getSharedManager()->attach('*', NotificationEvent::EVENT_NOTIFICATION_HTML, array($this,'createOutput'), 1);
        $this->notificationListener = $listener;
    }
public function setListener($listener)
    {
        $listener->getSharedManager()->attach('*', NotificationEvent::EVENT_NOTIFICATION_HTML, array($this,'createOutput'), 1);
        $this->notificationListener = $listener;
    }
attach a Listener, that is liable for storing the notifications
@param $listener