web\View renderAjax()

renderAjax() public method

Renders a view in response to an AJAX request.

This method is similar to render() except that it will surround the view being rendered with the calls of beginPage(), head(), beginBody(), endBody() and endPage(). By doing so, the method is able to inject into the rendering result with JS/CSS scripts and files that are registered with the view.

See also render().

public string renderAjax ( $view, $params = [], $context = null )
$view string

The view name. Please refer to render() on how to specify this parameter.

$params array

The parameters (name-value pairs) that will be extracted and made available in the view file.

$context object

The context that the view should use for rendering the view. If null, existing $context will be used.

return string

The rendering result

doc_Yii
2016-10-30 17:17:36
Comments
Leave a Comment

Please login to continue.