contentbox.models.ui

Class WidgetService

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

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

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


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


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


    • access = public
    • returntype = any
    • inject = ModuleService@cb
    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 themeService


    • access = public
    • returntype = any
    • inject = themeService@cb
    true false
    string widgetsPath
          The widgets location path.

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


    • access = public
    • returntype = any
    • inject = wirebox
    true false
    Constructor Summary
    init()
          Constructor.
    Method Summary
    string getColdbox()
    string getLog()
    string getModuleService()
    string getModuleSettings()
    string getSettingService()
    string getThemeService()
    any getWidget(any name, string type='core')
         Get a widget by name.
    query getWidgetCategories()
         Get unique, sorted widget categories from main widget query.
    string getWidgetCategory(any name, string type='core')
         Get a widget category.
    any getWidgetFilePath(string name, string type)
         Gets widget file path by name and type.
    string getWidgetIcon(any name, string type='core')
         Get a widget icon representation.
    any getWidgetRenderArgs([any udf], [any widget], [any type])
         Get widget rendering arguments.
    query getWidgets()
         Get installed widgets.
    string getWidgetsList()
         Get installed widgets as a list of names.
    string getWidgetsPath()
    string getWirebox()
    any onDIComplete()
         onDIComplete.
    boolean removeWidget(any widgetFile)
         Remove widget.
    any ripExtension(any filename)
         Rip Extensions from file name.
    any setColdbox(any coldbox)
    any setLog(any log)
    any setModuleService(any moduleService)
    any setModuleSettings(any moduleSettings)
    any setSettingService(any settingService)
    any setThemeService(any themeService)
    any setWidgetsPath(string widgetsPath)
    any setWirebox(any wirebox)
    struct uploadWidget(any fileField)
         Upload Widget.
     
    Methods inherited from class lucee.Component
    None

    Constructor Detail

    init

    public init()

    Constructor


    Property Detail

    coldbox

    property any coldbox

    Attributes:
    access - public
    required - false
    returntype - any
    inject - coldbox
    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 - ModuleService@cb
    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

    themeService

    property any themeService

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

    widgetsPath

    property string widgetsPath

    The widgets location path

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

    wirebox

    property any wirebox

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

    Method Detail

    getColdbox

    public string getColdbox()


    getLog

    public string getLog()


    getModuleService

    public string getModuleService()


    getModuleSettings

    public string getModuleSettings()


    getSettingService

    public string getSettingService()


    getThemeService

    public string getThemeService()


    getWidget

    public any getWidget(any name, string type='core')

    Get a widget by name

    Parameters:
    name - true
    type - This can be one of the following: core, layout, module

    getWidgetCategories

    public query getWidgetCategories()

    Get unique, sorted widget categories from main widget query returns Query


    getWidgetCategory

    public string getWidgetCategory(any name, string type='core')

    Get a widget category

    Parameters:
    name - The name of the widget
    type - This can be one of the following: core, layout, module

    getWidgetFilePath

    public any getWidgetFilePath(string name, string type)

    Gets widget file path by name and type

    Parameters:
    name - {String}
    type - {String}

    getWidgetIcon

    public string getWidgetIcon(any name, string type='core')

    Get a widget icon representation

    Parameters:
    name - The name of the widget
    type - This can be one of the following: core, layout, module

    getWidgetRenderArgs

    public any getWidgetRenderArgs([any udf], [any widget], [any type])

    Get widget rendering arguments

    Parameters:
    udf - The target UDF to render out arguments for
    widget - The widget name
    type - The widget type
    Returns:
    The argument metadata structure

    getWidgets

    public query getWidgets()

    Get installed widgets


    getWidgetsList

    public string getWidgetsList()

    Get installed widgets as a list of names


    getWidgetsPath

    public string getWidgetsPath()


    getWirebox

    public string getWirebox()


    onDIComplete

    public any onDIComplete()

    onDIComplete


    removeWidget

    public boolean removeWidget(any widgetFile)

    Remove widget

    Parameters:
    widgetFile - The location of the widget to remove

    ripExtension

    public any ripExtension(any filename)

    Rip Extensions from file name

    Parameters:
    filename - The target to rip

    setColdbox

    public any setColdbox(any coldbox)

    Parameters:
    coldbox

    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

    setThemeService

    public any setThemeService(any themeService)

    Parameters:
    themeService

    setWidgetsPath

    public any setWidgetsPath(string widgetsPath)

    Parameters:
    widgetsPath

    setWirebox

    public any setWirebox(any wirebox)

    Parameters:
    wirebox

    uploadWidget

    public struct uploadWidget(any fileField)

    Upload Widget

    Parameters:
    fileField - The form file field to use
    Returns:
    The CFFile structure from the upload results