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);
    }