renderFile() public method
Renders a view file.
| public string renderFile ( $file, $params = [] ) | ||
|---|---|---|
| $file | string |
The view file to be rendered. This can be either a file path or a path alias. |
| $params | array |
The parameters (name-value pairs) that should be made available in the view. |
| return | string |
The rendering result. |
| throws | yii\base\InvalidParamException |
if the view file does not exist. |
Please login to continue.