Ejemplo n.º 1
0
 public function before()
 {
     parent::before();
     \Config::load('order::cart', 'details');
     // Check if module is disabled and forbid access to it
     if (\Config::get('details.enabled') == FALSE) {
         throw new \HttpNotFoundException();
     }
 }
Ejemplo n.º 2
0
 /**
  * @param   none
  * @throws  none
  * @returns	void
  */
 public function before()
 {
     // users need to be logged in to access this controller
     //if ( ! \Sentry::check())
     if ($this->check_logged_type() != 'user') {
         \Messages::error('Access denied. Please login first');
         \Response::redirect('/user/login');
     }
     parent::before();
 }
Ejemplo n.º 3
0
 public function before()
 {
     parent::before();
     \Config::load('product::category', 'details');
     // Check if module is disabled and forbid access to it
     if (\Config::get('details.enabled') == FALSE) {
         throw new \HttpNotFoundException();
     }
     $this->theme_view_path = DOCROOT . \Theme::instance()->asset_path($this->view_dir);
 }
Ejemplo n.º 4
0
 public function before()
 {
     // already logged in?
     if (\Sentry::check() && \Sentry::user()->is_admin()) {
         \Messages::info('You are already logged in');
         \Response::redirect('admin');
     }
     parent::before();
     \Theme::instance()->active('admin');
     \Theme::instance()->set_template($this->template);
 }