lucee.Componentcontentbox.models.ui.ThemeService
ContentBox - A Modular Content Platform Copyright since 2012 by Ortus Solutions, Corp www.ortussolutions.com/products/contentbox --- Manages ContentBox themes
Property Summary | ||||
---|---|---|---|---|
type | property | default | serializable | required |
any
|
cbHelper
|
true
|
false
|
|
any
|
coreThemesPath
The location of core themes on disk: Defaults to /modules/contentbox/themes.
|
true
|
false
|
|
any
|
customThemesPath
The location of custom themes on disk: Defaults to /modules_app/contentbox-custom/_themes.
|
true
|
false
|
|
any
|
html
|
true
|
false
|
|
any
|
interceptorService
|
true
|
false
|
|
any
|
log
|
true
|
false
|
|
any
|
moduleService
|
true
|
false
|
|
any
|
moduleSettings
|
true
|
false
|
|
any
|
settingService
|
true
|
false
|
|
any
|
siteService
|
true
|
false
|
|
struct
|
themeRegistry
The theme registry of records.
|
true
|
false
|
|
struct
|
widgetCache
The cache of widgets for the active theme.
|
true
|
false
|
|
any
|
widgetService
|
true
|
false
|
|
any
|
wirebox
|
true
|
false
|
Constructor Summary | |
---|---|
init()
Constructor. |
Method Summary | |
---|---|
any
|
activateTheme(any themeName)
Activate a specific theme for the current working site. |
any
|
buildSettingsForm(struct activeTheme)
Build out the settings form HTML. |
ThemeService
|
buildThemeRegistry()
Build the theme registry via discovery. |
any
|
generateModal(any settingName, any thisSettingMD)
generateModal - Generate the modal for Theme Setting Help. |
struct
|
getActiveTheme()
Get the current active theme record for the current working site. |
string
|
getCbHelper()
|
string
|
getCoreThemesPath()
|
struct
|
getCustomThemes()
Get all registered custom themes via the registry. |
string
|
getCustomThemesPath()
|
string
|
getHtml()
|
string
|
getInterceptorService()
|
string
|
getLog()
|
string
|
getModuleService()
|
string
|
getModuleSettings()
|
string
|
getSettingService()
|
struct
|
getSettingsConstraints(any themeName)
Get constraints for setting fields. |
string
|
getSiteService()
|
string
|
getThemeMaintenanceLayout()
Get the current active theme's maintenance layout. |
string
|
getThemePrintLayout(any format, any layout)
Get the current theme's print layouts in ColdBox layout string format. |
struct
|
getThemeRecord(any themeName)
Get a theme record from the registry by name. |
string
|
getThemeRegistry()
|
string
|
getThemeSearchLayout()
Get the current theme's search layout. |
string
|
getThemeWidgetInvocationPath(string widgetName)
Returns the invocation path for the requested widget from themes service's layout cache. |
struct
|
getThemes()
Get all registered themes via the registry. |
private array
|
getThemesOnDisk(any path)
Get all themes loaded on disk path, only returns directories. |
string
|
getWidgetCache()
|
string
|
getWidgetService()
|
string
|
getWirebox()
|
boolean
|
isActiveTheme(any themeName)
Verify if the passed theme name is the currently working site active theme. |
void
|
onDIComplete()
onDIComplete startup the theming services according to loaded module data. |
any
|
processThemeRecord([any name], [any path], [any invocationPath], [any includePath], [any type], [any module])
Process a theme record and store appropriate data and cfc registries. |
private any
|
registerThemeSettings(any name, array settings, any site)
Register a theme's settings. |
boolean
|
removeTheme(any themeName)
Remove a custom theme only. |
any
|
saveThemeSettings(any name, struct settings)
Save theme settings as they are coming from form submissions as a struct with a common prefix. |
any
|
setCbHelper(any cbHelper)
|
any
|
setCoreThemesPath(any coreThemesPath)
|
any
|
setCustomThemesPath(any customThemesPath)
|
any
|
setHtml(any html)
|
any
|
setInterceptorService(any interceptorService)
|
any
|
setLog(any log)
|
any
|
setModuleService(any moduleService)
|
any
|
setModuleSettings(any moduleSettings)
|
any
|
setSettingService(any settingService)
|
any
|
setSiteService(any siteService)
|
any
|
setThemeRegistry(struct themeRegistry)
|
any
|
setWidgetCache(struct widgetCache)
|
any
|
setWidgetService(any widgetService)
|
any
|
setWirebox(any wirebox)
|
any
|
startupSiteThemes()
This method is called from the UI module to make sure all site themes are online before. |
any
|
startupTheme(any name, [boolean processWidgets='true'], [any site=''])
Startup a theme in the system, processes interceptions, modules, widgets, etc. |
boolean
|
themeMaintenanceViewExists()
Does the current active theme have a maintenance view. |
private any
|
unregisterThemeSettings(array settings)
Unregister theme settings. |
Methods inherited from class lucee.Component |
---|
None |
Constructor Detail |
---|
Constructor
Property Detail |
---|
access
- publicrequired
- falsereturntype
- anyinject
- provider:CBHelper@contentboxserializable
- trueThe location of core themes on disk: Defaults to /modules/contentbox/themes
access
- publicrequired
- falsereturntype
- anyserializable
- trueThe location of custom themes on disk: Defaults to /modules_app/contentbox-custom/_themes
access
- publicrequired
- falsereturntype
- anyserializable
- trueaccess
- publicrequired
- falsereturntype
- anyinject
- HTMLHelper@coldboxserializable
- trueaccess
- publicrequired
- falsereturntype
- anyinject
- coldbox:interceptorServiceserializable
- trueaccess
- publicrequired
- falsereturntype
- anyinject
- logbox:logger:{this}serializable
- trueaccess
- publicrequired
- falsereturntype
- anyinject
- coldbox:moduleServiceserializable
- trueaccess
- publicrequired
- falsereturntype
- anyinject
- coldbox:setting:modulesserializable
- trueaccess
- publicrequired
- falsereturntype
- anyinject
- settingService@contentboxserializable
- trueaccess
- publicrequired
- falsereturntype
- anyinject
- siteService@contentboxserializable
- trueThe theme registry of records
access
- publicrequired
- falsereturntype
- anyserializable
- trueThe cache of widgets for the active theme
access
- publicrequired
- falsereturntype
- anyserializable
- trueaccess
- publicrequired
- falsereturntype
- anyinject
- provider:widgetService@contentboxserializable
- trueaccess
- publicrequired
- falsereturntype
- anyinject
- wireboxserializable
- trueMethod Detail |
---|
Activate a specific theme for the current working site
themeName
- The theme name to activateBuild out the settings form HTML
activeTheme
- The active theme structBuild the theme registry via discovery
generateModal - Generate the modal for Theme Setting Help
settingName
- - The name of the setting the Theme Setting Help modal will be created forthisSettingMD
- - The setting struct itselfGet the current active theme record for the current working site
Get all registered custom themes via the registry.
Get constraints for setting fields
themeName
- The name of the themeGet the current active theme's maintenance layout
Get the current theme's print layouts in ColdBox layout string format
format
- export formatlayout
- layout nameGet a theme record from the registry by name.
themeName
- The name of the themeGet the current theme's search layout
Returns the invocation path for the requested widget from themes service's layout cache
widgetName
- The name of the widgetGet all registered themes via the registry.
Get all themes loaded on disk path, only returns directories
path
- The path to checkVerify if the passed theme name is the currently working site active theme
themeName
- The name of the theme to checkonDIComplete startup the theming services according to loaded module data
Process a theme record and store appropriate data and cfc registries
name
- The name of the theme on diskpath
- The path of the themeinvocationPath
- The invocation path of the themeincludePath
- The include path of the themetype
- The type of theme it is: core, custommodule
- The module this theme exists underRegister a theme's settings
name
- The theme namesettings
- The settings structsite
- The site this theme is activated onRemove a custom theme only.
themeName
- The theme to removeSave theme settings as they are coming from form submissions as a struct with a common prefix cb_theme_{themeName}_{settingName}
name
- The theme namesettings
- The settings structcbHelper
coreThemesPath
customThemesPath
html
interceptorService
log
moduleService
moduleSettings
settingService
siteService
themeRegistry
widgetCache
widgetService
wirebox
This method is called from the UI module to make sure all site themes are online before serving requets
Startup a theme in the system, processes interceptions, modules, widgets, etc
name
- The name of the theme to activateprocessWidgets
- Process widget registration on activation, defaults to true.site
- The site id or object we are starting up this theme forDoes the current active theme have a maintenance view
Unregister theme settings
settings
- The settings to unregister