public function render($data = array(), $params = array())
    {
        if ($this->controller->getTemplate() !== null) {
            foreach ($this->controller->filters as $filter) {
                $this->twig->addFilter($filter);
            }
            $this->twig->addGlobal('params', $params);
            $key = "twig" . microtime(true);
//            Debugbar::timer($key, $this->controller->getTemplate());
            $template = $this->twig->load($this->controller->getTemplate());
            $data = $template->render($this->getData($data));
//            Debugbar::stopTimer($key);
        }
        return $data;
    }
public function render($data = array(), $params = array())
    {
        if ($this->controller->getTemplate() !== null) {
            foreach ($this->controller->filters as $filter) {
                $this->twig->addFilter($filter);
            }
            $this->twig->addGlobal('params', $params);
            $key = "twig" . microtime(true);
//            Debugbar::timer($key, $this->controller->getTemplate());
            $template = $this->twig->load($this->controller->getTemplate());
            $data = $template->render($this->getData($data));
//            Debugbar::stopTimer($key);
        }
        return $data;
    }
public function render ( $ data = array ( ) , $ params = array ( ) ) { if ( $ this -> controller -> getTemplate ( ) !== null ) { foreach ( $ this -> controller -> filters as $ filter ) { $ this -> twig -> addFilter ( $ filter ) ; } $ this -> twig -> addGlobal ( 'params' , $ params ) ; $ key = "twig" . microtime ( true ) ; //            Debugbar::timer($key, $this->controller->getTemplate()); $ template = $ this -> twig -> load ( $ this -> controller -> getTemplate ( ) ) ; $ data = $ template -> render ( $ this -> getData ( $ data ) ) ; //            Debugbar::stopTimer($key); } return $ data ; }
Devuelve la vista renderizada

@param null $data
@param array $params
@return array|null|string
Devuelve la vista renderizada