public function before() { parent::before(); // Check Auth if (!\Auth\Auth::check()) { \Fuel\Core\Response::redirect('auth'); } /* * Theme Set */ $this->theme = \Theme::instance(); $this->theme->set_template('index'); /* * Breadcrumb */ // $this->_breadcrumb = Breadcrumb::create_links(); if (Session::get('lang')) { $this->_lang = Session::get('lang'); } if (Input::method() == 'GET') { $this->_get = Input::get(); } if (Input::method() == 'POST') { $this->_post = Input::post(); } $this->initialized(); }
/** * This method will be called after we route to the destinated method * * @access public */ public function before() { $this->language = \Hybrid\Factory::get_language(); $this->user = \Hybrid\Acl_User::get(); \Event::trigger('controller_before'); return parent::before(); }
/** * This method will be called after we route to the destinated method * * @access public * @return void */ public function before() { $this->language = Factory::get_language(); $this->user = Auth::make('user')->get(); Event::trigger('controller_before'); return parent::before(); }
/** * This method will be called after we route to the destinated method * * @access public */ public function before() { $this->language = \Hybrid\Factory::get_language(); $this->user = \Hybrid\Acl_User::get(); \Event::trigger('controller_before'); if (\Hybrid\Request::main() !== \Hybrid\Request::active()) { $this->set_content_type = false; } \Hybrid\Restful::auth(); return parent::before(); }
/** * This method gets called before the action is called. * * @return void */ public function before() { parent::before(); if (!$this->response) { $this->response = Response::forge(); } $this->view = View::forge(); if (!empty($this->layout)) { $this->layout = View::forge('layouts' . DS . $this->layout); $this->view->layout = $this->layout; $this->layout->module = $this->request->module; $this->layout->controller = $this->request->controller; $this->layout->action = $this->request->action; $this->layout->title = null; $this->layout->breadcrumbs = array(); $this->layout->content = ''; } }
/** * This method will be called before we route to the destinated method * * @access public * @return void */ public function before() { $this->rest = Restserver::is_rest(); $this->language = Factory::get_language(); $this->user = Auth::make('user')->get(); Event::trigger('controller_before'); if (false === $this->rest) { $this->prepare_template(); } else { $this->prepare_rest(); } return parent::before(); }
/** * This method will be called after we route to the destinated method * * @access public * @return void */ public function before() { $this->language = Factory::get_language(); $this->user = Auth::make('user')->get(); Event::trigger('controller_before'); if (Request::is_hmvc()) { $this->set_content_type = false; } Restserver::auth(); return parent::before(); }
public function before() { parent::before(); }