protected function renderLayout(string $content): string
    {
        $content = str_replace('<!-- extends "' . $this->layout . '" -->', '', $content);
        $content = trim($content);
        $this->assign(['content' => $content]);
        $layoutFile = $this->pathLayouts . '/' . $this->layout . '.phtml';
        return $this->renderFile($layoutFile);
    }
protected function renderLayout(string $content): string
    {
        $content = str_replace('<!-- extends "' . $this->layout . '" -->', '', $content);
        $content = trim($content);
        $this->assign(['content' => $content]);
        $layoutFile = $this->pathLayouts . '/' . $this->layout . '.phtml';
        return $this->renderFile($layoutFile);
    }
protected function renderLayout ( string $ content ) : string { $ content = str_replace ( '<!-- extends "' . $ this -> layout . '" -->' , '' , $ content ) ; $ content = trim ( $ content ) ; $ this -> assign ( [ 'content' => $ content ] ) ; $ layoutFile = $ this -> pathLayouts . '/' . $ this -> layout . '.phtml' ; return $ this -> renderFile ( $ layoutFile ) ; }
Renders a layout file.

@param string $content
@throws TemplatingException
@return string
Renders a layout file .