Beispiel #1
0
 /**
  * Assigns the template [View] as the request response.
  */
 public function after()
 {
     if ($this->auto_render === true) {
         $this->template->set_global('request', Request::get());
         $this->template->set_global('modules', $this->cms_modules);
         $this->template->set_global('module', $this->curr_module);
         $this->template->title = $this->_get_title();
         $this->template->keywords = $this->keywords ?: Config::get('home.meta_k');
         $this->template->description = $this->description ?: Config::get('home.meta_d');
         $this->template->content = $this->content;
         if (Kohana::$environment === Kohana::DEVELOPMENT) {
             $v_profiler = View::factory('profiler/stats');
         }
         $this->template->bind_global('v_profiler', $v_profiler);
         $this->response->body($this->template->render());
     }
     parent::after();
 }