public function subscribe()
 {
     $callback = function ($event) {
         $this->getEventManager()->trigger($this->eventFactory->restore($event));
     };
     $callback->bindTo($this);
     $this->eventBusAdapter->subscribe($callback);
 }
 /**
  * Subscribe all internal listeners to external events
  */
 public function subscribe()
 {
     $callback = function ($event) {
         $this->getEventManager()->trigger($this->eventFactory->restore($event));
     };
     $callback->bindTo($this);
     try {
         $this->eventBusAdapterSubscriber->subscribe($callback);
     } catch (EventBusException $e) {
         //Trigger event with exception details
         $this->getEventManager()->trigger('eventBus.exception', null, ['message' => $e->getMessage(), 'trace' => $e->getTrace()]);
     }
     return false;
 }