luya\components\Mail::wrapLayout PHP Method

wrapLayout() protected method

Wrap the layout from the $layout propertie and store the passed content as $content variable in the view.
protected wrapLayout ( string $content )
$content string The content to wrapp inside the layout.
    protected function wrapLayout($content)
    {
        // do not wrap the content if layout is turned off.
        if ($this->layout === false) {
            return $content;
        }
        $view = Yii::$app->getView();
        return $view->renderPhpFile(Yii::getAlias($this->layout), ['content' => $content]);
    }