PHP 클래스 Gdn_ThemeManager, vanilla

파일 보기 프로젝트 열기: vanilla/vanilla 1 사용 예제들

공개 메소드들

메소드 설명
__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

비공개 메소드들

메소드 설명
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.

메소드 상세

__construct() 공개 메소드

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

availableThemes() 공개 메소드

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

clearThemeCache() 공개 메소드

Deprecated.
사용 중단:
public clearThemeCache ( )

currentTheme() 공개 메소드

public currentTheme ( ) : mixed
리턴 mixed

desktopTheme() 공개 메소드

public desktopTheme ( ) : mixed
리턴 mixed

disableTheme() 공개 메소드

public disableTheme ( )

enableTheme() 공개 메소드

public enableTheme ( $ThemeName, boolean $IsMobile = false ) : boolean
$ThemeName
$IsMobile boolean
리턴 boolean

enabledTheme() 공개 메소드

public enabledTheme ( ) : Gdn_Config | mixed
리턴 Gdn_Config | mixed

enabledThemeInfo() 공개 메소드

public enabledThemeInfo ( boolean $ReturnInSourceFormat = false ) : array | mixed
$ReturnInSourceFormat boolean
리턴 array | mixed

findThemeFiles() 공개 메소드

Deprecated.
public findThemeFiles ( ) : array
리턴 array Deprecated.

getMobilePreview() 공개 메소드

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
리턴 string The folder name of the previewed mobile theme or an empty string.

getPreview() 공개 메소드

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

getThemeInfo() 공개 메소드

public getThemeInfo ( $ThemeName ) : mixed
$ThemeName
리턴 mixed

hasMobilePreview() 공개 메소드

Returns whether there's a mobile theme being previewed.
public hasMobilePreview ( ) : boolean
리턴 boolean Whether there's a mobile theme being previewed.

hasPreview() 공개 메소드

Returns whether there's a theme being previewed.
public hasPreview ( ) : boolean
리턴 boolean Whether there's a theme being previewed.

indexSearchPath() 공개 메소드

public indexSearchPath ( $SearchPath, &$ThemeInfo, null $PathListing = null ) : boolean | string
$SearchPath
$ThemeInfo
$PathListing null
리턴 boolean | string

mobileTheme() 공개 메소드

public mobileTheme ( ) : mixed
리턴 mixed

searchPaths() 공개 메소드

Deprecated.
사용 중단:
public searchPaths ( )

start() 공개 메소드

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() 공개 메소드

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

themeFromType() 공개 메소드

public themeFromType ( $Type ) : mixed
$Type
리턴 mixed