コード例 #1
0
ファイル: Twig.php プロジェクト: uda/kohana-theme
 public function after()
 {
     if ($this->auto_render === true) {
         /** @var Twig $engine */
         $engine = $this->engine;
         $engine::set_global('title_separator', $this->base_config('title_separator'));
         $engine::set_global('title', $this->title());
     }
     parent::after();
 }
コード例 #2
0
ファイル: View.php プロジェクト: uda/kohana-theme
 public function after()
 {
     if ($this->auto_render === true) {
         $this->template->set('site_direction', $this->base_config('direction'));
         $this->template->set('title_separator', $this->base_config('title_separator'));
         $this->template->set('title', $this->title());
         $this->template->set('styles', $this->style());
         $this->template->set('scripts', $this->script());
         foreach (array_keys($this->_regions) as $region) {
             if (in_array($region, array('header', 'footer')) && empty($this->_regions[$region])) {
                 $view = View::factory('html/' . $region);
                 if ($region == 'header') {
                     $view->set('site_name', $this->config('site_name'));
                 }
                 $this->region($region, $view);
             }
             $this->template->{$region} = $this->region($region);
         }
     }
     parent::after();
 }