Class humhub\modules\ui\view\components\ThemeViews

Inheritancehumhub\modules\ui\view\components\ThemeViews » yii\base\Component
Available since version1.3

ThemeViews component determines provided view files of a theme.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
translate() Converts a file to a themed file if possible. humhub\modules\ui\view\components\ThemeViews

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
legacyTranslate() Tries to automatically maps the view file of a module to a themed one. humhub\modules\ui\view\components\ThemeViews
legacyTranslateResource() humhub\modules\ui\view\components\ThemeViews

Property Details

$theme public property

Method Details

legacyTranslate() protected method

Tries to automatically maps the view file of a module to a themed one.

Formats: .../moduleId/views/controllerId/viewName.php to: .../views/moduleId/controllerId/viewName.php

.../moduleId/[widgets|activities|notifications]/views/viewName.php to: .../views/moduleId/[widgets|activities|notifications]/viewName.php

protected string legacyTranslate ( $path )
$path
return string

Theme view path or null

legacyTranslateResource() protected method

protected void legacyTranslateResource ( $path )
$path
translate() public method

Converts a file to a themed file if possible.

If no view theme is available for the given view path null is returned.

public string|null translate ( $path )
$path
return string|null

The translated file name or null