-
Backend
-
Behaviors
-
Classes
-
Controllers
-
Database
-
Seeds
-
-
Facades
-
FormWidgets
-
Helpers
-
Models
-
ReportWidgets
-
Skins
-
Traits
-
VueComponents
-
Widgets
- ServiceProvider
-
-
Cms
-
Classes
- Asset
- CmsCompoundObject
- CmsController
- CmsException
- CmsObject
- CmsObjectCollection
- CodeBase
- CodeParser
- ComponentBase
- ComponentHelpers
- ComponentManager
- ComponentPartial
- Content
- Controller
- EditorExtension
- Layout
- LayoutCode
- MediaLibrary
- MediaLibraryItem
- MediaViewHelper
- Meta
- ObjectMemoryCache
- Page
- PageCode
- Partial
- PartialCode
- PartialStack
- Router
- Theme
- ThemeManager
-
Components
-
Controllers
-
Facades
-
FormWidgets
-
Helpers
-
Models
-
ReportWidgets
-
Traits
-
Twig
- ComponentNode
- ComponentTokenParser
- ContentNode
- ContentTokenParser
- DebugExtension
- DefaultNode
- DefaultTokenParser
- Extension
- FlashNode
- FlashTokenParser
- FrameworkNode
- FrameworkTokenParser
- Loader
- PageNode
- PageTokenParser
- PartialNode
- PartialTokenParser
- PlaceholderNode
- PlaceholderTokenParser
- PutNode
- PutTokenParser
- ScriptsNode
- ScriptsTokenParser
- StylesNode
- StylesTokenParser
-
VueComponents
-
Widgets
- ServiceProvider
-
-
Editor
-
Behaviors
-
Classes
-
Controllers
-
VueComponents
- ServiceProvider
-
-
Media
-
Classes
-
Controllers
-
FormWidgets
-
Twig
-
Widgets
- ServiceProvider
-
-
System
-
Behaviors
-
Classes
-
Console
-
OctoberUtil
- ComposerScript
- OctoberDown
- OctoberFresh
- OctoberMigrate
- OctoberMirror
- OctoberPasswd
- OctoberUp
- OctoberUpdate
- OctoberUtil
- PluginCheck
- PluginDisable
- PluginEnable
- PluginInstall
- PluginList
- PluginRefresh
- PluginRemove
- ProjectSet
- ProjectSync
- ThemeCheck
- ThemeInstall
- ThemeList
- ThemeRemove
- ThemeSync
- ThemeUse
-
-
Controllers
-
Database
-
Facades
-
Helpers
-
Models
-
ReportWidgets
-
Traits
-
Twig
-
Widgets
- ServiceProvider
-
-
Events
-
backend
-
ajax
-
filter
-
form
-
list
-
menu
-
page
-
user
-
-
cms
-
ajax
-
block
-
combiner
-
component
-
object
-
page
-
resizer
-
router
-
template
-
theme
-
-
exception
-
halcyon
-
datasource
-
-
mailer
-
media
-
model
-
auth
-
form
-
relation
-
/docs/api/model/relation/add
-
/docs/api/model/relation/associate
- attach
-
/docs/api/model/relation/beforeadd
-
/docs/api/model/relation/beforeassociate
- beforeAttach
- beforeDetach
-
/docs/api/model/relation/beforedissociate
-
/docs/api/model/relation/beforeremove
- detach
-
/docs/api/model/relation/dissociate
-
/docs/api/model/relation/remove
-
- afterBoot
- afterCreate
- afterDelete
- afterFetch
- afterRestore
- afterSave
- afterUpdate
- afterValidate
- beforeCreate
- beforeDelete
- beforeFetch
- beforeGetAttribute
- beforeRestore
- beforeSave
- beforeSetAttribute
- beforeUpdate
- beforeValidate
- getAttribute
- saveInternal
- setAttribute
-
-
system
-
assets
-
console
-
mirror
-
theme
-
-
reportwidgets
-
resizer
-
settings
- extendConfigFile
-
-
translator
-
-
Library
-
Argon
-
Assetic
-
Asset
-
Cache
-
Exception
-
Factory
-
Filter
- BaseCssFilter
- CallablesFilter
- CssCacheBustingFilter
- CssImportFilter
- CssMinFilter
- CssRewriteFilter
- FilterCollection
- JavascriptImporter
- JSMinFilter
- JSMinPlusFilter
- JSqueezeFilter
- LessCompiler
- LessphpFilter
- MinifyCssCompressorFilter
- PackagerFilter
- PackerFilter
- ScssCompiler
- ScssphpFilter
- StylesheetMinify
-
Util
- README
- AssetManager
- AssetWriter
- FilterManager
-
-
Auth
-
Models
- AuthException
- Manager
-
-
Config
-
Database
-
Attach
-
Behaviors
-
Concerns
-
Connections
-
Connectors
-
Models
-
Relations
-
Schema
-
Traits
-
Updates
- README
- Builder
- Collection
- DatabaseServiceProvider
- DataFeed
- Dongle
- MemoryCache
- MigrationServiceProvider
- Model
- ModelBehavior
- ModelException
- MorphPivot
- NestedTreeScope
- Pivot
- QueryBuilder
- SortableScope
- TreeCollection
- Updater
-
-
Events
-
Exception
-
Extension
-
Filesystem
-
Flash
-
Foundation
-
Bootstrap
-
Console
-
Exception
-
Http
-
Middleware
- Kernel
-
-
Providers
- Application
- Maker
-
-
Halcyon
-
Datasource
-
Exception
-
Processors
-
Traits
- README
- Builder
- Collection
- HalcyonServiceProvider
- MemoryCacheManager
- MemoryRepository
- Model
-
-
Html
-
Mail
-
Network
-
Parse
-
Parsedown
-
Syntax
- Bracket
- Ini
- Markdown
- MarkdownData
- ParseServiceProvider
- Twig
- Yaml
-
-
Process
-
Resize
-
Router
-
Scaffold
-
Support
-
Translation
-
- Documentation
- API
- Cms
- Classes
- Theme
Cms\Classes\Theme
Theme class represents the CMS theme CMS theme is a directory that contains all CMS objects - pages, layouts, partials and asset files.. The theme parameters are specified in the theme.ini file in the theme root directory.
Protected properties
protected string $dirName
dirName specifies the theme directory name
protected mixed $configCache
configCache keeps the cached configuration file values
protected static mixed $activeThemeCache
activeThemeCache in memory
protected static mixed $editThemeCache
editThemeCache in memory
Public methods
public void __get($name)
__get magic
Parameters
- $name
public void __isset($key)
__isset magic
Parameters
- $key
public static void all()
all returns all themes on disk
public static void allAvailable()
allAvailable returns all available themes, those that are not locked
public void databaseLayerEnabled()
databaseLayerEnabled checks global and local config
public static void exists($dirName)
exists determines if a theme with given directory name exists
Parameters
- $dirName
public static void getActiveTheme()
getActiveTheme returns the active theme object
public static void getActiveThemeCode()
getActiveThemeCode returns the active theme code.
By default the active theme is loaded from the cms.active_theme config item. If there's a back-end user session, loads the theme code from the CMS Editor Edit Theme user preference.
This behavior can be overridden by the cms.theme.getActiveTheme event listener.
public void getConfig()
getConfig reads the theme.yaml file and returns the theme configuration values
public void getConfigArray($name)
getConfigArray returns an array value from the theme configuration file by its name
If the value is a string, it is treated as a YAML file and loaded.
Parameters
- $name
public void getConfigValue($name, $default=NULL)
getConfigValue returns a value from the theme configuration file by its name
Parameters
- $name
- $default
public void getCustomData()
getCustomData returns data specific to this theme
public void getDatasource()
getDatasource returns the theme's datasource
public void getDirName()
getDirName returns the theme directory name
public static void getEditTheme()
getEditTheme returns the edit theme
public static void getEditThemeCode()
getEditThemeCode returns the edit theme code
There are several ways the edit theme can be set. The code loads the edit theme from the following sources: → CMS Editor edit theme for the currently authenticated back-end user, if any. → cms.edit_theme config item. → CMS Active theme. → cms.theme.getEditTheme event. The theme code returned by the event handler has the highest priority.
public void getFormConfig()
getFormConfig returns the dedicated form
option that provide form fields
for customization, this is an immutable accessor for that and also an
solid anchor point for extension
public void getId()
getId is a helper for {{ theme.id }} twig vars that returns a unique string for this theme
public void getParentOptions()
getParentOptions returns dropdown options for a parent theme
public void getParentTheme()
getParentTheme returns a parent theme, if enabled
public void getPath($dirName=NULL)
getPath returns the absolute theme path.
Parameters
- $dirName
public void getPreviewImageUrl()
getPreviewImageUrl returns the theme preview image URL
If the image file doesn't exist returns the placeholder image URL.
public void hasCustomData()
hasCustomData returns true if this theme has form fields that supply customization data
public void hasParentTheme()
hasParentTheme checks if a parent theme is defined
public void isActiveTheme()
isActiveTheme returns true if this theme is the chosen active theme
public void isLocked()
isLocked returns true if the theme cannot be used
public void listPages($skipCache=false)
listPages returns a list of pages in the theme This method is used internally in the routing process and in the back-end UI. Skipping cache indicates if the pages should be reloaded from the disk bypassing the cache.
Parameters
- $skipCache
public static void load($dirName)
load the theme
Parameters
- $dirName
public void registerHalyconDatasource()
registerHalyconDatasource ensures this theme is registered as a Halcyon datasource
public void removeCustomData()
removeCustomData removes data specific to this theme
public static void resetCache()
resetCache resets any memory or cache involved with the active or edit theme
public void secondLayerEnabled()
secondLayerEnabled is true if two or more datasources exist
public static void setActiveTheme($code)
setActiveTheme sets the active theme
The active theme code is stored in the database and overrides the configuration cms.active_theme config item.
Parameters
- $code
public void setDirName($dirName)
setDirName sets the theme directory name
Parameters
- $dirName
public static void setEditTheme($code)
setEditTheme sets the editing theme
Parameters
- $code
public void useParentAsset($relativePath)
useParentAsset determines if a parent asset should be used
Parameters
- $relativePath
public void writeConfig($values=array(), $overwrite=false)
writeConfig to the theme.yaml file with the supplied array values
Parameters
- $values
- $overwrite
Protected methods
protected void writeComposerFile($data)
writeComposerFile writes to a composer file for a theme
Parameters
- $data