public function renderContent($content)
    {
        $layoutFile = $this->findLayoutFile($this->getView());
        if ($layoutFile !== false) {
            return $this->getView()->renderFile($layoutFile, ['content' => $content], $this);
        } else {
            return $content;
        }
    }
public function renderContent($content)
    {
        $layoutFile = $this->findLayoutFile($this->getView());
        if ($layoutFile !== false) {
            return $this->getView()->renderFile($layoutFile, ['content' => $content], $this);
        } else {
            return $content;
        }
    }
public function renderContent ( $ content ) { $ layoutFile = $ this -> findLayoutFile ( $ this -> getView ( ) ) ; if ( $ layoutFile !== false ) { return $ this -> getView ( ) -> renderFile ( $ layoutFile , [ 'content' => $ content ] , $ this ) ; } else { return $ content ; } }
Renders a static string by applying a layout.
@param string $content 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.
@since 2.0.1
Renders a static string by applying a layout .