public renderContent ( string $content ) : string | ||
$content | string | the static string being rendered |
return | string | the rendering result of the layout with the given static string as the `$content` variable. If the layout is disabled, the string will be returned back. |
public function renderContent($content)
{
$layoutFile = $this->findLayoutFile($this->getView());
if ($layoutFile !== false) {
return $this->getView()->renderFile($layoutFile, ['content' => $content], $this);
} else {
return $content;
}
}