contentbox.models.ui

Class ThemeService

lucee.Component
    extended by contentbox.models.ui.ThemeService

ContentBox - A Modular Content Platform Copyright since 2012 by Ortus Solutions, Corp www.ortussolutions.com/products/contentbox --- Manages system themes

Class Attributes:
  • threadsafe
  •  
  • singleton
  •  
  • synchronized : false
  •  
  • accessors : true
  •  
  • persistent : false
  •  
    Property Summary
    type property default serializable required
    any cbHelper


    • access = public
    • returntype = any
    • inject = provider:CBHelper@cb
    true false
    any html


    • access = public
    • returntype = any
    • inject = HTMLHelper@coldbox
    true false
    any interceptorService


    • access = public
    • returntype = any
    • inject = coldbox:interceptorService
    true false
    any log


    • access = public
    • returntype = any
    • inject = logbox:logger:{this}
    true false
    any moduleService


    • access = public
    • returntype = any
    • inject = coldbox:moduleService
    true false
    any moduleSettings


    • access = public
    • returntype = any
    • inject = coldbox:setting:modules
    true false
    any settingService


    • access = public
    • returntype = any
    • inject = id:settingService@cb
    true false
    any themeCFCRegistry


    • access = public
    • returntype = any
    true false
    any themeRegistry


    • access = public
    • returntype = any
    true false
    any themesIncludePath


    • access = public
    • returntype = any
    true false
    any themesInvocationPath


    • access = public
    • returntype = any
    true false
    any themesPath


    • access = public
    • returntype = any
    true false
    struct widgetCache


    • access = public
    • returntype = any
    true false
    any wirebox


    • access = public
    • returntype = any
    • inject = wirebox
    true false
    any zipUtil


    • access = public
    • returntype = any
    • inject = zipUtil@cb
    true false
    Constructor Summary
    init()
          Constructor.
    Method Summary
    any activateTheme(any themeName)
         Activate a theme.
    any buildSettingsForm(query activeTheme)
         Build out the settings form HTML.
    query buildThemeRegistry()
         Build theme registry.
    any generateModal(any settingName, any thisSettingMD)
         generateModal - Generate the modal for Theme Setting Help.
    query getActiveTheme()
         Get active theme record.
    string getCbHelper()
    string getHtml()
    string getInterceptorService()
    string getLog()
    string getModuleService()
    string getModuleSettings()
    struct getSettingsConstraints(any themeName)
         Get constraints for setting fields.
    string getSettingService()
    string getThemeCFCRegistry()
    string getThemeMaintenanceLayout()
         Get the current theme's maintenance layout.
    string getThemePrintLayout(any format, any layout)
         Get the current theme's print layouts in ColdBox layout string format.
    query getThemeRecord(any themeName)
         Get a theme record from the registry by name.
    string getThemeRegistry()
    query getThemes()
         Get all registered themes.
    string getThemeSearchLayout()
         Get the current theme's search layout.
    string getThemesIncludePath()
    string getThemesInvocationPath()
    string getThemesPath()
    string getThemeWidgetPath(string widgetName)
         Returns 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 theme.
    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 setHtml(any html)
    any setInterceptorService(any interceptorService)
    any setLog(any log)
    any setModuleService(any moduleService)
    any setModuleSettings(any moduleSettings)
    any setSettingService(any settingService)
    any setThemeCFCRegistry(any themeCFCRegistry)
    any setThemeRegistry(any themeRegistry)
    any setThemesIncludePath(any themesIncludePath)
    any setThemesInvocationPath(any themesInvocationPath)
    any setThemesPath(any themesPath)
    any setWidgetCache(struct widgetCache)
    any setWirebox(any wirebox)
    any setZipUtil(any zipUtil)
    any startupActiveTheme()
         Startup Active Theme procedures.
    boolean themeMaintenanceViewExists()
         Does theme have a maintenance view.
    private any unregisterThemeSettings(array settings)
         Unregister theme settings.
    struct uploadTheme(any fileField)
         Upload theme.
     
    Methods inherited from class lucee.Component
    None

    Constructor Detail

    init

    public init()

    Constructor


    Property Detail

    cbHelper

    property any cbHelper

    Attributes:
    access - public
    required - false
    returntype - any
    inject - provider:CBHelper@cb
    serializable - true

    html

    property any html

    Attributes:
    access - public
    required - false
    returntype - any
    inject - HTMLHelper@coldbox
    serializable - true

    interceptorService

    property any interceptorService

    Attributes:
    access - public
    required - false
    returntype - any
    inject - coldbox:interceptorService
    serializable - true

    log

    property any log

    Attributes:
    access - public
    required - false
    returntype - any
    inject - logbox:logger:{this}
    serializable - true

    moduleService

    property any moduleService

    Attributes:
    access - public
    required - false
    returntype - any
    inject - coldbox:moduleService
    serializable - true

    moduleSettings

    property any moduleSettings

    Attributes:
    access - public
    required - false
    returntype - any
    inject - coldbox:setting:modules
    serializable - true

    settingService

    property any settingService

    Attributes:
    access - public
    required - false
    returntype - any
    inject - id:settingService@cb
    serializable - true

    themeCFCRegistry

    property any themeCFCRegistry

    Attributes:
    access - public
    required - false
    returntype - any
    serializable - true

    themeRegistry

    property any themeRegistry

    Attributes:
    access - public
    required - false
    returntype - any
    serializable - true

    themesIncludePath

    property any themesIncludePath

    Attributes:
    access - public
    required - false
    returntype - any
    serializable - true

    themesInvocationPath

    property any themesInvocationPath

    Attributes:
    access - public
    required - false
    returntype - any
    serializable - true

    themesPath

    property any themesPath

    Attributes:
    access - public
    required - false
    returntype - any
    serializable - true

    widgetCache

    property struct widgetCache

    Attributes:
    access - public
    required - false
    returntype - any
    serializable - true

    wirebox

    property any wirebox

    Attributes:
    access - public
    required - false
    returntype - any
    inject - wirebox
    serializable - true

    zipUtil

    property any zipUtil

    Attributes:
    access - public
    required - false
    returntype - any
    inject - zipUtil@cb
    serializable - true

    Method Detail

    activateTheme

    public any activateTheme(any themeName)

    Activate a theme

    Parameters:
    themeName - The theme name to activate

    buildSettingsForm

    public any buildSettingsForm(query activeTheme)

    Build out the settings form HTML

    Parameters:
    activeTheme - The active theme struct

    buildThemeRegistry

    public query buildThemeRegistry()

    Build theme registry


    generateModal

    public any generateModal(any settingName, any thisSettingMD)

    generateModal - Generate the modal for Theme Setting Help

    Parameters:
    settingName - - The name of the setting the Theme Setting Help modal will be created for
    thisSettingMD - - The setting struct itself

    getActiveTheme

    public query getActiveTheme()

    Get active theme record


    getCbHelper

    public string getCbHelper()


    getHtml

    public string getHtml()


    getInterceptorService

    public string getInterceptorService()


    getLog

    public string getLog()


    getModuleService

    public string getModuleService()


    getModuleSettings

    public string getModuleSettings()


    getSettingsConstraints

    public struct getSettingsConstraints(any themeName)

    Get constraints for setting fields

    Parameters:
    themeName - The name of the theme

    getSettingService

    public string getSettingService()


    getThemeCFCRegistry

    public string getThemeCFCRegistry()


    getThemeMaintenanceLayout

    public string getThemeMaintenanceLayout()

    Get the current theme's maintenance layout


    getThemePrintLayout

    public string getThemePrintLayout(any format, any layout)

    Get the current theme's print layouts in ColdBox layout string format

    Parameters:
    format - export format
    layout - layout name

    getThemeRecord

    public query getThemeRecord(any themeName)

    Get a theme record from the registry by name

    Parameters:
    themeName - The name of the theme

    getThemeRegistry

    public string getThemeRegistry()


    getThemes

    public query getThemes()

    Get all registered themes


    getThemeSearchLayout

    public string getThemeSearchLayout()

    Get the current theme's search layout


    getThemesIncludePath

    public string getThemesIncludePath()


    getThemesInvocationPath

    public string getThemesInvocationPath()


    getThemesPath

    public string getThemesPath()


    getThemeWidgetPath

    public string getThemeWidgetPath(string widgetName)

    Returns path for the requested widget from themes service's layout cache return String

    Parameters:
    widgetName - The name of the widget

    getWidgetCache

    public string getWidgetCache()


    getWirebox

    public string getWirebox()


    getZipUtil

    public string getZipUtil()


    isActiveTheme

    public boolean isActiveTheme(any themeName)

    Is active theme check

    Parameters:
    themeName - The name of the theme to check

    onDIComplete

    public void onDIComplete()

    onDIComplete startup the theming services according to loaded module data


    registerThemeSettings

    private any registerThemeSettings(any name, array settings)

    Register a theme's settings

    Parameters:
    name - The theme name
    settings - The settings struct
    Returns:
    ThemeService

    removeTheme

    public boolean removeTheme(any themeName)

    Remove theme

    Parameters:
    themeName - The theme to remove

    saveThemeSettings

    public any saveThemeSettings(any name, struct settings)

    Save theme settings as they are coming from form submissions as a struct with a common prefix cb_theme_{themeName}_{settingName}

    Parameters:
    name - The theme name
    settings - The settings struct
    Returns:
    ThemeService

    setCbHelper

    public any setCbHelper(any cbHelper)

    Parameters:
    cbHelper

    setHtml

    public any setHtml(any html)

    Parameters:
    html

    setInterceptorService

    public any setInterceptorService(any interceptorService)

    Parameters:
    interceptorService

    setLog

    public any setLog(any log)

    Parameters:
    log

    setModuleService

    public any setModuleService(any moduleService)

    Parameters:
    moduleService

    setModuleSettings

    public any setModuleSettings(any moduleSettings)

    Parameters:
    moduleSettings

    setSettingService

    public any setSettingService(any settingService)

    Parameters:
    settingService

    setThemeCFCRegistry

    public any setThemeCFCRegistry(any themeCFCRegistry)

    Parameters:
    themeCFCRegistry

    setThemeRegistry

    public any setThemeRegistry(any themeRegistry)

    Parameters:
    themeRegistry

    setThemesIncludePath

    public any setThemesIncludePath(any themesIncludePath)

    Parameters:
    themesIncludePath

    setThemesInvocationPath

    public any setThemesInvocationPath(any themesInvocationPath)

    Parameters:
    themesInvocationPath

    setThemesPath

    public any setThemesPath(any themesPath)

    Parameters:
    themesPath

    setWidgetCache

    public any setWidgetCache(struct widgetCache)

    Parameters:
    widgetCache

    setWirebox

    public any setWirebox(any wirebox)

    Parameters:
    wirebox

    setZipUtil

    public any setZipUtil(any zipUtil)

    Parameters:
    zipUtil

    startupActiveTheme

    public any startupActiveTheme()

    Startup Active Theme procedures


    themeMaintenanceViewExists

    public boolean themeMaintenanceViewExists()

    Does theme have a maintenance view


    unregisterThemeSettings

    private any unregisterThemeSettings(array settings)

    Unregister theme settings

    Parameters:
    settings - The settings to unregister
    Returns:
    ThemeService

    uploadTheme

    public struct uploadTheme(any fileField)

    Upload theme

    Parameters:
    fileField - The file uploaded field
    Returns:
    struct : { error:boolean, messages:string }