PHP Class Gdn_ThemeManager, vanilla

Afficher le fichier Open project: vanilla/vanilla Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( AddonManager $addonManager = null, $hasRequest = null )
availableThemes ( boolean $force = false ) : array Looks through the themes directory for valid themes.
clearThemeCache ( ) Deprecated.
currentTheme ( ) : mixed
desktopTheme ( ) : mixed
disableTheme ( )
enableTheme ( $ThemeName, boolean $IsMobile = false ) : boolean
enabledTheme ( ) : Gdn_Config | mixed
enabledThemeInfo ( boolean $ReturnInSourceFormat = false ) : array | mixed
findThemeFiles ( ) : array Deprecated.
getMobilePreview ( ) : string Returns the folder name (aka slug) of the previewed mobile theme, or an empty string if there is no previewed mobile theme.
getPreview ( ) : string Returns the folder name (aka slug) of the previewed theme, or an empty string if there is no previewed theme.
getThemeInfo ( $ThemeName ) : mixed
hasMobilePreview ( ) : boolean Returns whether there's a mobile theme being previewed.
hasPreview ( ) : boolean Returns whether there's a theme being previewed.
indexSearchPath ( $SearchPath, &$ThemeInfo, null $PathListing = null ) : boolean | string
mobileTheme ( ) : mixed
searchPaths ( ) Deprecated.
start ( $Force = false ) Sets up the theme framework
testTheme ( string $themeName ) : boolean Test a theme for dependencies and parse errors.
themeFromType ( $Type ) : mixed

Private Methods

Méthode Description
asset ( string $path, string $withDomain ) : string Clear the dependencies on {@link asset()} for unit testing.
findThemeFilesOld ( string $themePath ) : array | false Find the files associated with the theme.
scanThemeFileOld ( string $ThemeFile, string $VariableName = '' ) : null | array Deprecated.
themeHook ( string $themeName, string $forAction, boolean $callback = false ) : void Hooks to the various actions, i.e. enable, disable and load.

Method Details

__construct() public méthode

public __construct ( AddonManager $addonManager = null, $hasRequest = null )
$addonManager Vanilla\AddonManager

availableThemes() public méthode

The themes are returned as an associative array of "Theme Name" => "Theme Info Array".
public availableThemes ( boolean $force = false ) : array
$force boolean Deprecated.
Résultat array Returns the available themes in an array.

clearThemeCache() public méthode

Deprecated.
Deprecation:
public clearThemeCache ( )

currentTheme() public méthode

public currentTheme ( ) : mixed
Résultat mixed

desktopTheme() public méthode

public desktopTheme ( ) : mixed
Résultat mixed

disableTheme() public méthode

public disableTheme ( )

enableTheme() public méthode

public enableTheme ( $ThemeName, boolean $IsMobile = false ) : boolean
$ThemeName
$IsMobile boolean
Résultat boolean

enabledTheme() public méthode

public enabledTheme ( ) : Gdn_Config | mixed
Résultat Gdn_Config | mixed

enabledThemeInfo() public méthode

public enabledThemeInfo ( boolean $ReturnInSourceFormat = false ) : array | mixed
$ReturnInSourceFormat boolean
Résultat array | mixed

findThemeFiles() public méthode

Deprecated.
public findThemeFiles ( ) : array
Résultat array Deprecated.

getMobilePreview() public méthode

Returns the folder name (aka slug) of the previewed mobile theme, or an empty string if there is no previewed mobile theme.
public getMobilePreview ( ) : string
Résultat string The folder name of the previewed mobile theme or an empty string.

getPreview() public méthode

Returns the folder name (aka slug) of the previewed theme, or an empty string if there is no previewed theme.
public getPreview ( ) : string
Résultat string The folder name of the previewed mobile theme or an empty string.

getThemeInfo() public méthode

public getThemeInfo ( $ThemeName ) : mixed
$ThemeName
Résultat mixed

hasMobilePreview() public méthode

Returns whether there's a mobile theme being previewed.
public hasMobilePreview ( ) : boolean
Résultat boolean Whether there's a mobile theme being previewed.

hasPreview() public méthode

Returns whether there's a theme being previewed.
public hasPreview ( ) : boolean
Résultat boolean Whether there's a theme being previewed.

indexSearchPath() public méthode

public indexSearchPath ( $SearchPath, &$ThemeInfo, null $PathListing = null ) : boolean | string
$SearchPath
$ThemeInfo
$PathListing null
Résultat boolean | string

mobileTheme() public méthode

public mobileTheme ( ) : mixed
Résultat mixed

searchPaths() public méthode

Deprecated.
Deprecation:
public searchPaths ( )

start() public méthode

This method indexes all available themes and extracts their information. It then determines which plugins have been enabled, and includes them. Finally, it parses all plugin files and extracts their events and plugged methods.
public start ( $Force = false )

testTheme() public méthode

Test a theme for dependencies and parse errors.
public testTheme ( string $themeName ) : boolean
$themeName string The case-sensitive theme name.
Résultat boolean Returns

themeFromType() public méthode

public themeFromType ( $Type ) : mixed
$Type
Résultat mixed