Kohana_Kostache_Layout::render PHP Method

render() public method

public render ( $class, $template = NULL )
    public function render($class, $template = NULL)
    {
        $content = $this->_engine->getLoader()->load($this->_detect_template_path($class));
        $this->_engine->setPartials(array(Kostache_Layout::CONTENT_PARTIAL => $content));
        return $this->_engine->loadTemplate($this->_layout)->render($class);
    }

Usage Example

Ejemplo n.º 1
0
 public function render($class, $template = NULL)
 {
     if (!empty($class->_partials)) {
         $partials = array();
         foreach ($class->_partials as $key => $value) {
             $partials[$key] = file_get_contents(Kohana::find_file('templates', $value, 'mustache'));
         }
         $this->_engine->setPartials($partials);
     }
     return parent::render($class, $template);
 }
All Usage Examples Of Kohana_Kostache_Layout::render
Kohana_Kostache_Layout