diff --git a/framework/web/ViewAction.php b/framework/web/ViewAction.php index 67e721d39b..db143af56f 100644 --- a/framework/web/ViewAction.php +++ b/framework/web/ViewAction.php @@ -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()); @@ -86,6 +86,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 */