Extends
lithium\core\Object
Render a string template after applying context filters
Use examples in the Html::link() method:
`return $this->_render(__METHOD__, 'link', compact('title', 'url', 'options'), $scope);`
Parameters
- string $method name of method that is calling the render (for context filters)
- string $string template key (in Helper::_strings) to render
- array $params associated array of template inserts {:key} will be replaced by value
- array $options
Returns
string Rendered HTMLSource
protected function _render($method, $string, $params, array $options = array()) {
$strings = $this->_strings;
if ($this->_context) {
foreach ($params as $key => $value) {
$params[$key] = $this->_context->applyHandler(
$this, $method, $key, $value, $options
);
}
$strings = $this->_context->strings();
}
return String::insert(isset($strings[$string]) ? $strings[$string] : $string, $params);
}