Interface humhub\components\rendering\Renderer

Implemented byhumhub\components\rendering\DefaultViewPathRenderer, humhub\components\rendering\LayoutRenderer, humhub\components\rendering\MailLayoutRenderer, humhub\components\rendering\MailRenderer, humhub\components\rendering\ViewPathRenderer, humhub\modules\activity\components\ActivityMailRenderer, humhub\modules\activity\components\ActivityWebRenderer, humhub\modules\notification\renderer\MailRenderer, humhub\modules\notification\renderer\WebRenderer
Available since version1.2

Renderer interface used by render components to render Viewable instances.

A Renderer implementation is responsible for rendering the viewable either by using it's viewName or by converting it's data into a specific format.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
render() Renders the given $viewable. humhub\components\rendering\Renderer

Method Details

render() public abstract method

Renders the given $viewable.

The renderer will usually use the $viewable->viewName to determine the target view and forward the given $params to $viewable->getViewParams($params). By doing so, the $params can be used to overwrite the default view parameter of $viewable.

It is upon the renderer implementation to handle non existing views. They could throw a yii\base\ViewNotFoundException, or provide a default view.

public abstract void render ( humhub\components\rendering\Viewable $viewable, $params = [] )
$viewable humhub\components\rendering\Viewable
$params \humhub\components\rendering\type