HumHub Documentation (unofficial)

ThemeHelper
in package

ThemeHelper

Tags
since
1.3

Table of Contents

Properties

$_themes  : array<string|int, Theme>

Methods

getAllVariables()  : array<string|int, mixed>
getThemeByName()  : Theme
Returns a Theme by given name
getThemeByPath()  : Theme|null
Return a Theme instance by given path
getThemeParent()  : Theme|null
getThemes()  : array<string|int, Theme>
Returns an array of all available themes.
getThemesByPath()  : array<string|int, Theme>
Returns an array of Theme instances of a given directory
getThemeTree()  : array<string|int, Theme>
Returns an array of all used themes
isFluid()  : bool

Properties

$_themes

protected static array<string|int, Theme> $_themes = null

loaded themes

Methods

getAllVariables()

public static getAllVariables(Theme $theme) : array<string|int, mixed>
Parameters
$theme : Theme
Return values
array<string|int, mixed>

getThemeByName()

Returns a Theme by given name

public static getThemeByName(string $name) : Theme
Parameters
$name : string

of the theme

Return values
Theme

getThemeByPath()

Return a Theme instance by given path

public static getThemeByPath(mixed $path[, array<string|int, mixed> $options = [] ]) : Theme|null
Parameters
$path : mixed
$options : array<string|int, mixed> = []

additional options for Theme instance

Return values
Theme|null

getThemes()

Returns an array of all available themes.

public static getThemes() : array<string|int, Theme>
Return values
array<string|int, Theme>

The themes

getThemesByPath()

Returns an array of Theme instances of a given directory

public static getThemesByPath(string $path[, array<string|int, mixed> $additionalOptions = [] ]) : array<string|int, Theme>
Parameters
$path : string

the theme directory

$additionalOptions : array<string|int, mixed> = []

options for Theme instance

Return values
array<string|int, Theme>

getThemeTree()

Returns an array of all used themes

public static getThemeTree(Theme $theme[, bool $includeBaseTheme = true ]) : array<string|int, Theme>
Parameters
$theme : Theme
$includeBaseTheme : bool = true

should the given theme also included in the theme tree

Return values
array<string|int, Theme>

the parent themes

isFluid()

public static isFluid([Theme|null $theme = null ]) : bool
Parameters
$theme : Theme|null = null
Tags
since
1.4
Return values
bool

        
On this page

Search results