ThemeManager
class ThemeManager
Theme Manager Class
Traits
Singleton trait.
Properties
static protected | $instance | from Singleton | |
protected | $themeModel | ||
array | $installedThemes | ||
array | $themes | ||
$activeTheme | |||
protected array | $paths | ||
protected | $config | ||
protected | $loadedConfig | ||
protected | $loadedCustomizerConfig | ||
protected | $booted |
Methods
No description
Returns a list of all themes in the system.
Loads all installed theme from application config.
Finds all available themes and loads them in to the $themes array.
Loads a single theme in to the manager.
No description
No description
No description
Checks to see if an extension has been registered.
Returns the theme domain by looking in its path.
Returns the parent theme code.
Create a Directory Map of all themes
Determines if a theme is activated by looking at the default themes config.
Determines if a theme is disabled by looking at the installed themes config.
Checks to see if a theme has been registered.
Search a theme folder for files.
No description
No description
No description
Returns a theme path based on its name.
Find a file.
Load a single theme generic file into an array. The file will be found by looking in the _layouts, _pages, _partials, _content, themes folders.
No description
Write an existing theme layout, page, partial or content file.
Rename a theme layout, page, partial or content in the file system.
Delete a theme layout, page, partial or content from the file system.
Extract uploaded/downloaded theme zip folder
Delete existing theme folder from filesystem.
No description
Read configuration from Config/Meta file
Check configuration in Config file
No description
No description
Details
in
Singleton at line 18
final static
instance()
Create a new instance of this singleton.
in
Singleton at line 28
final static
forgetInstance()
Forget this singleton's instance if it exists
in
Singleton at line 36
final protected
__construct()
Constructor.
at line 54
initialize()
No description
in
Singleton at line 48
__clone()
No description
in
Singleton at line 53
__wakeup()
No description
at line 63
static
addAssetsFromActiveThemeManifest(Assets $manager)
No description
at line 78
static
applyAssetVariablesOnCombinerFilters(array $filters, Theme $theme = null)
No description
at line 101
array
listThemes()
Returns a list of all themes in the system.
at line 114
loadInstalled()
Loads all installed theme from application config.
at line 126
array
loadThemes()
Finds all available themes and loads them in to the $themes array.
at line 144
bool|object
loadTheme(string $themeCode, string $path)
Loads a single theme in to the manager.
at line 163
bootThemes()
No description
at line 179
getActiveTheme()
No description
at line 185
getActiveThemeCode()
No description
at line 202
Theme
findTheme($themeCode)
Returns a theme object based on its name.
at line 218
bool
hasTheme($themeCode)
Checks to see if an extension has been registered.
at line 230
string
findParent($themeCode)
Returns the theme domain by looking in its path.
at line 244
string
findParentCode($themeCode)
Returns the parent theme code.
at line 255
array
paths()
Create a Directory Map of all themes
at line 273
bool
isActive($themeCode)
Determines if a theme is activated by looking at the default themes config.
at line 289
bool
isDisabled($name)
Determines if a theme is disabled by looking at the installed themes config.
at line 303
bool
checkName($themeCode)
Checks to see if a theme has been registered.
at line 319
array
listFiles(string $themeCode, string $subFolder = null)
Search a theme folder for files.
at line 337
isLocked($themeCode)
No description
at line 342
checkParent($themeCode)
No description
at line 352
isLockedPath($path)
No description
at line 373
string|null
findPath($themeCode)
Returns a theme path based on its name.
at line 390
string|bool
findFile(string $filename, string $themeCode, string $base = null)
Find a file.
Scans for files located within themes directories. Also scans each theme directories for layouts, partials, and content. Generates fatal error if file not found.
at line 422
TemplateSource
readFile(string $filePath, string $themeCode)
Load a single theme generic file into an array. The file will be found by looking in the _layouts, _pages, _partials, _content, themes folders.
at line 434
newFile($filePath, $themeCode)
No description
at line 458
bool
writeFile(string $filePath, array $attributes, string $themeCode)
Write an existing theme layout, page, partial or content file.
at line 479
bool
renameFile(string $filePath, string $newFilePath, string $themeCode)
Rename a theme layout, page, partial or content in the file system.
at line 509
bool
deleteFile(string $filePath, string $themeCode)
Delete a theme layout, page, partial or content from the file system.
at line 532
bool
extractTheme(string $zipPath)
Extract uploaded/downloaded theme zip folder
at line 574
bool
removeTheme(null $themeCode)
Delete existing theme folder from filesystem.
at line 585
installTheme($code, $version = null)
No description
at line 606
Themes_model
createChildTheme(Themes_model $model)
No description
at line 639
array|null
getMetaFromFile(string $themeCode)
Read configuration from Config/Meta file
at line 661
getFileNameParts($path, Theme $theme)
No description
at line 682
protected array|null
validateMetaFile($config, string $path)
Check configuration in Config file
at line 701
protected
writeChildThemeMetaFile($path, $parentTheme, $themeConfig)
No description
at line 727
protected
getComposerInstalledVersion($themeCode)
No description