public function init()
 {
     $this->modelCategories = new categoryModel($this->doctrineService);
     $this->translator = Utility::translate();
     //check login
     $user = Utility::checkLogin($this);
     if (!is_object($user) && $user == 0) {
         $this->redirect()->toRoute('frontend/child', array('controller' => 'login'));
     }
     parent::init();
 }
Esempio n. 2
0
 public function init()
 {
     $service_locator_str = 'doctrine';
     $this->sm = $this->getServiceLocator();
     $doctrineService = $this->sm->get($service_locator_str);
     $this->modelOrder = new orderModel($doctrineService);
     $this->modelOrderDetail = new orderdetailModel($doctrineService);
     $this->tableModel = new tableModel($doctrineService);
     $this->translator = Utility::translate();
     //check login
     $this->userLogin = Utility::checkLogin($this);
     if (!is_object($this->userLogin) && $this->userLogin == 0) {
         $this->redirect()->toRoute('admin/child', array('controller' => 'login'));
     }
     return parent::init();
 }
Esempio n. 3
0
 public function init()
 {
     parent::init();
 }
Esempio n. 4
0
 public function init()
 {
     parent::init();
     $this->modelOrder = new orderModel($this->doctrineService);
     $this->modelOrderDetail = new orderdetailModel($this->doctrineService);
 }
Esempio n. 5
0
 public function init()
 {
     parent::init();
     $this->modelMenu = new menuModel($this->doctrineService);
     $this->translator = Utility::translate();
 }