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(); } }
/** * @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(); }
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); }
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); }