Class humhub\components\rendering\MailRenderer

Inheritancehumhub\components\rendering\MailRenderer » humhub\components\rendering\DefaultViewPathRenderer » humhub\components\rendering\ViewPathRenderer » yii\base\BaseObject
Available since version1.2

MailRenderer extends the DefaultViewPathRenderer with a renderText method.

The $defaultTextView and/or $defaultTextViewPath can be set to define a fallback view or search view path.

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$defaultTextView string Fallback text view. humhub\components\rendering\MailRenderer
$defaultTextViewPath string Fallback text view path. humhub\components\rendering\MailRenderer
$defaultView string Fallback view humhub\components\rendering\DefaultViewPathRenderer
$defaultViewPath string Fallback view path humhub\components\rendering\DefaultViewPathRenderer
$parent boolean If set to true the renderer will search in the parents view directory for the view. humhub\components\rendering\ViewPathRenderer
$subPath string A subpath within the view folder used for searching the view e. humhub\components\rendering\MailRenderer
$viewPath string View path humhub\components\rendering\ViewPathRenderer

Public Methods

Hide inherited methods

MethodDescriptionDefined By
getViewFile() Returnes the viewFile of the given Viewable. humhub\components\rendering\ViewPathRenderer
getViewPath() Returns the directory containing the view files for this event. humhub\components\rendering\ViewPathRenderer
render() Renders the viewable by searching the viewable's viewName within the given viewPath. humhub\components\rendering\ViewPathRenderer
renderText() Renders the text mail content for the given $viewable. humhub\components\rendering\MailRenderer
renderView() Helper function for rendering a Viewable with the given viewParams. humhub\components\rendering\ViewPathRenderer

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
suffix() Checks if the given $viewName has a file suffix or not. humhub\components\rendering\ViewPathRenderer

Property Details

$defaultTextView public property

Fallback text view.

public string $defaultTextView null
$defaultTextViewPath public property

Fallback text view path.

$subPath public property

A subpath within the view folder used for searching the view e.g mails. This will only be used if $viewPath is not given.

public string $subPath 'mails'

Method Details

renderText() public method

Renders the text mail content for the given $viewable.

public \humhub\components\rendering\type renderText ( humhub\components\rendering\Viewable $viewable, $params = [] )
$viewable humhub\components\rendering\Viewable
$params array