yii\apidoc\templates\html\ApiRenderer::renderWithLayout PHP Method

renderWithLayout() protected method

Renders file applying layout
protected renderWithLayout ( string $viewFile, array $params ) : string
$viewFile string the view name
$params array the parameters (name-value pairs) that will be extracted and made available in the view file.
return string
    protected function renderWithLayout($viewFile, $params)
    {
        $output = $this->getView()->render($viewFile, $params, $this);
        if ($this->layout !== false) {
            $params['content'] = $output;
            return $this->getView()->renderFile($this->layout, $params, $this);
        } else {
            return $output;
        }
    }