/**
  * @param MvcEvent $e
  * @return mixed
  */
 public function onDispatch(MvcEvent $e)
 {
     $e->getResponse()->setMetadata('No-Cache', true);
     if (!$this->getAuthService()->hasIdentity()) {
         return $this->redirect()->toRoute('backend/login');
     }
     return parent::onDispatch($e);
 }
Example #2
0
 /**
  * @param MvcEvent $e
  * @return mixed|void
  */
 public function onDispatch(MvcEvent $e)
 {
     $this->layout('backend/layout/login');
     return parent::onDispatch($e);
 }