lithium\template\view\Renderer::_render()
Shortcut method used to render elements and other nested templates from inside the templating layer.
Parameters
-
string
$typeThe type of template to render, usually either
'element'or'template'. Indicates the process used to render the content. Seelithium\template\View::$_processesfor more info. -
string
$templateThe template file name. For example, if
'header'is passed, and$typeis set to'element', then the template rendered will beviews/elements/header.html.php(assuming the default configuration). -
array
$dataAn array of any other local variables that should be injected into the template. By default, only the values used to render the current template will be sent. If
$datais non-empty, both sets of variables will be merged. -
array
$optionsAny options accepted by
template\View::render().
Returns
stringReturns a the rendered template content as a string.
Source
protected function _render($type, $template, array $data = [], array $options = []) {
$context = $this->_options;
$options += $this->_options;
$result = $this->_view->render($type, $data + $this->_data, compact('template') + $options);
$this->_options = $context;
return $result;
}