Пример #1
0
 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();
 }
Пример #2
0
 /**
  * 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();
 }
Пример #3
0
 /**
  * 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();
 }
Пример #4
0
 /**
  * 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();
 }
Пример #5
0
 /**
  * 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 = '';
     }
 }
Пример #6
0
 /**
  * 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();
 }
Пример #7
0
 /**
  * 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();
 }
Пример #8
0
 public function before()
 {
     parent::before();
 }