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
|
|
struct
|
themeRegistry
The theme registry of records.
|
true
|
false
|
|
struct
|
widgetCache
The cache of widgets for the active theme.
|
true
|
false
|
|
any
|
wirebox
|
true
|
false
|
|
any
|
zipUtil
|
true
|
false
|
Constructor Summary | |
---|---|
init()
Constructor. |
Method Summary | |
---|---|
any
|
activateTheme(any themeName)
Activate a theme. |
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. |
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()
|
struct
|
getSettingsConstraints(any themeName)
Get constraints for setting fields. |
string
|
getSettingService()
|
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()
|
struct
|
getThemes()
Get all registered themes via the registry. |
string
|
getThemeSearchLayout()
Get the current theme's search layout. |
private array
|
getThemesOnDisk(any path)
Get all themes loaded on disk path, only returns directories. |
string
|
getThemeWidgetInvocationPath(string widgetName)
Returns the invocation path for the requested widget from themes service's layout cache. |
string
|
getWidgetCache()
|
string
|
getWirebox()
|
string
|
getZipUtil()
|
boolean
|
isActiveTheme(any themeName)
Is active theme check. |
void
|
onDIComplete()
onDIComplete startup the theming services according to loaded module data. |
private any
|
registerThemeSettings(any name, array settings)
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
|
setThemeRegistry(struct themeRegistry)
|
any
|
setWidgetCache(struct widgetCache)
|
any
|
setWirebox(any wirebox)
|
any
|
setZipUtil(any zipUtil)
|
any
|
startupActiveTheme()
Startup Active Theme procedures. |
boolean
|
themeMaintenanceViewExists()
Does the current active theme have a maintenance view. |
private any
|
unregisterThemeSettings(array settings)
Unregister theme settings. |
struct
|
uploadTheme(any fileField)
Upload a theme to the custom themes location. |
Methods inherited from class lucee.Component |
---|
None |
Constructor Detail |
---|
Constructor
Property Detail |
---|
access
- publicrequired
- falsereturntype
- anyinject
- provider:CBHelper@cbserializable
- 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
- id:settingService@cbserializable
- 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
- wireboxserializable
- trueaccess
- publicrequired
- falsereturntype
- anyinject
- zipUtil@cbserializable
- trueMethod Detail |
---|
Activate a theme
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
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 all registered themes via the registry.
Get the current theme's search layout
Get all themes loaded on disk path, only returns directories
path
- The path to checkReturns the invocation path for the requested widget from themes service's layout cache
widgetName
- The name of the widgetIs active theme check
themeName
- The name of the theme to checkonDIComplete startup the theming services according to loaded module data
Register a theme's settings
name
- The theme namesettings
- The settings structRemove 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
themeRegistry
widgetCache
wirebox
zipUtil
Startup Active Theme procedures
Does the current active theme have a maintenance view
Unregister theme settings
settings
- The settings to unregisterUpload a theme to the custom themes location
fileField
- The file uploaded field