ThemeHandlerInterface
interface ThemeHandlerInterface (View source)
Manages the list of available themes.
Methods
Refreshes the theme info data of currently installed themes.
Resets the internal state of the theme handler.
Scans and collects theme extension data and their engines.
Finds all the base themes for the specified theme.
Gets the human readable name of a given theme.
Returns the default theme.
Returns an array of directories for all installed themes.
Determines whether a given theme is installed.
Returns a theme extension object from the currently active theme list.
Determines if a theme should be shown in the user interface.
Details
Extension[]
listInfo()
Returns a list of currently installed themes.
addTheme(Extension $theme)
Adds a theme extension to the internal listing.
refreshInfo()
Refreshes the theme info data of currently installed themes.
Modules can alter theme info, so this is typically called after a module has been installed or uninstalled.
reset()
Resets the internal state of the theme handler.
Extension[]
rebuildThemeData()
Scans and collects theme extension data and their engines.
array
getBaseThemes(array $themes, string $theme)
Finds all the base themes for the specified theme.
Themes can inherit templates and function implementations from earlier themes.
string
getName(string $theme)
Gets the human readable name of a given theme.
string
getDefault()
Returns the default theme.
array
getThemeDirectories()
Returns an array of directories for all installed themes.
Useful for tasks such as finding a file that exists in all theme directories.
bool
themeExists(string $theme)
Determines whether a given theme is installed.
Extension
getTheme(string $name)
Returns a theme extension object from the currently active theme list.
bool
hasUi(string $name)
Determines if a theme should be shown in the user interface.
To be shown in the UI the theme has to be installed. If the theme is hidden it will not be shown unless it is the default or admin theme.