yii\mail\BaseMailer::render PHP Method

render() public method

The view will be rendered using the [[view]] component.
public render ( string $view, array $params = [], string | boolean $layout = false ) : string
$view string the view name or the path alias of the view file.
$params array the parameters (name-value pairs) that will be extracted and made available in the view file.
$layout string | boolean layout view name or path alias. If false, no layout will be applied.
return string the rendering result.
    public function render($view, $params = [], $layout = false)
    {
        $output = $this->getView()->render($view, $params, $this);
        if ($layout !== false) {
            return $this->getView()->render($layout, ['content' => $output, 'message' => $this->_message], $this);
        } else {
            return $output;
        }
    }