public function onBootstrap(EventInterface $event) { $application = $event->getApplication(); $application->getEventManager()->attach(MvcEvent::EVENT_DISPATCH, array($this, 'loadMenu'), -10); }