public function render($templateName, array $parameters = array())
    {
        $templateDir = $this->assetsResolver->resolveAssetSourcePath($this->module->getCode(), false, $templateName, $this->parser);

        if (null !== $templateDir) {
            // retrieve the template
            $content      = $this->parser->render($templateDir . DS . $templateName, $parameters);
        } else {
            $content = sprintf("ERR: Unknown template %s for module %s", $templateName, $this->module->getCode());
        }

        return $content;
    }
public function render($templateName, array $parameters = array())
    {
        $templateDir = $this->assetsResolver->resolveAssetSourcePath($this->module->getCode(), false, $templateName, $this->parser);

        if (null !== $templateDir) {
            // retrieve the template
            $content      = $this->parser->render($templateDir . DS . $templateName, $parameters);
        } else {
            $content = sprintf("ERR: Unknown template %s for module %s", $templateName, $this->module->getCode());
        }

        return $content;
    }
public function render ( $ templateName , array $ parameters = array ( ) ) { $ templateDir = $ this -> assetsResolver -> resolveAssetSourcePath ( $ this -> module -> getCode ( ) , false , $ templateName , $ this -> parser ) ; if ( null !== $ templateDir ) { // retrieve the template $ content = $ this -> parser -> render ( $ templateDir . DS . $ templateName , $ parameters ) ; } else { $ content = sprintf ( "ERR: Unknown template %s for module %s" , $ templateName , $ this -> module -> getCode ( ) ) ; } return $ content ; }
helper function allowing you to render a template using a template engine

@param string $templateName the template path of the template
@param array  $parameters   an array of parameters to assign to a template engine

@return string the content generated by a template engine
helper function allowing you to render a template using a template engine