Commit 9fd0dced by Alexander Makarov

Extracted render method to allow custom renderers by subclassing

parent a4be5bc9
......@@ -74,7 +74,7 @@ class ViewAction extends Action
}
try {
return $this->controller->render($viewPath);
return $this->render($viewPath);
} catch (InvalidParamException $e) {
if (YII_DEBUG) {
throw new NotFoundHttpException($e->getMessage());
......@@ -87,6 +87,17 @@ class ViewAction extends Action
}
/**
* Renders a view
*
* @param string $viewPath view path
* @return string result of the rendering
*/
protected function render($viewPath)
{
return $this->controller->render($viewPath);
}
/**
* @inheritdoc
*/
protected function afterRun()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment