lucee.Componentcontentbox.models.ui.WidgetService
ContentBox - A Modular Content Platform Copyright since 2012 by Ortus Solutions, Corp www.ortussolutions.com/products/contentbox --- Manages ContentBox Widgets
Property Summary | ||||
---|---|---|---|---|
type | property | default | serializable | required |
any
|
coldbox
|
true
|
false
|
|
struct
|
coreWidgetsMap
The core widgets map.
|
true
|
false
|
|
string
|
coreWidgetsPath
The core widgets location path.
|
true
|
false
|
|
struct
|
customWidgetsMap
The custom widgets map.
|
true
|
false
|
|
string
|
customWidgetsPath
The custom widgets location path.
|
true
|
false
|
|
any
|
log
|
true
|
false
|
|
any
|
moduleService
|
true
|
false
|
|
any
|
moduleSettings
|
true
|
false
|
|
any
|
settingService
|
true
|
false
|
|
any
|
themeService
|
true
|
false
|
|
any
|
wirebox
|
true
|
false
|
Constructor Summary | |
---|---|
init()
Constructor. |
Method Summary | |
---|---|
string
|
discoverWidgetType(any name)
Discover the type of widget, either custom or core. |
string
|
getColdbox()
|
string
|
getCoreWidgetsMap()
|
string
|
getCoreWidgetsPath()
|
string
|
getCustomWidgetsMap()
|
string
|
getCustomWidgetsPath()
|
string
|
getLog()
|
string
|
getModuleService()
|
string
|
getModuleSettings()
|
string
|
getSettingService()
|
string
|
getThemeService()
|
any
|
getWidget(any name, string type='core')
Get a widget by name and type (defaults to `core|custom`). |
any
|
getWidgetByDiscovery(any name)
Get a widget instance by name convention discovery. |
query
|
getWidgetCategories()
Get unique, sorted widget categories from main widget query. |
string
|
getWidgetCategory(any name, string type='core')
Get a widget category. |
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([boolean reload='false'])
Get all installed widgets in ContentBox by looking at the following locations:. |
private query
|
getWidgetsFromPath(any path)
Get a query listing of widgets in a path. |
array
|
getWidgetsList()
Get installed widgets as an array of names. |
string
|
getWirebox()
|
any
|
onDIComplete()
onDIComplete. |
private any
|
processModuleWidgets([query qRecords])
Discover modules widgets and attach records to incoming widget records. |
private any
|
processThemeWidgets([query qRecords])
Discover active theme widgets and attach records to incoming widget records. |
private any
|
processWidgets([query qRecords], [any type])
Discover the custom location widgets. |
boolean
|
removeWidget(any widgetFile)
Remove a widget from the custom locations. |
any
|
ripExtension(any filename)
Rip Extensions from file name. |
any
|
setColdbox(any coldbox)
|
any
|
setCoreWidgetsMap(struct coreWidgetsMap)
|
any
|
setCoreWidgetsPath(string coreWidgetsPath)
|
any
|
setCustomWidgetsMap(struct customWidgetsMap)
|
any
|
setCustomWidgetsPath(string customWidgetsPath)
|
any
|
setLog(any log)
|
any
|
setModuleService(any moduleService)
|
any
|
setModuleSettings(any moduleSettings)
|
any
|
setSettingService(any settingService)
|
any
|
setThemeService(any themeService)
|
any
|
setWirebox(any wirebox)
|
struct
|
uploadWidget(any fileField)
Upload a widget to the custom location. |
Methods inherited from class lucee.Component |
---|
None |
Constructor Detail |
---|
Constructor
Property Detail |
---|
access
- publicrequired
- falsereturntype
- anyinject
- coldboxserializable
- trueThe core widgets map
access
- publicrequired
- falsereturntype
- anyserializable
- trueThe core widgets location path
access
- publicrequired
- falsereturntype
- anyserializable
- trueThe custom widgets map
access
- publicrequired
- falsereturntype
- anyserializable
- trueThe custom widgets location path
access
- publicrequired
- falsereturntype
- anyserializable
- trueaccess
- publicrequired
- falsereturntype
- anyinject
- logbox:logger:{this}serializable
- trueaccess
- publicrequired
- falsereturntype
- anyinject
- ModuleService@cbserializable
- trueaccess
- publicrequired
- falsereturntype
- anyinject
- coldbox:setting:modulesserializable
- trueaccess
- publicrequired
- falsereturntype
- anyinject
- id:settingService@cbserializable
- trueaccess
- publicrequired
- falsereturntype
- anyinject
- themeService@cbserializable
- trueaccess
- publicrequired
- falsereturntype
- anyinject
- wireboxserializable
- trueMethod Detail |
---|
Discover the type of widget, either custom or core. The lookup order is: custom, theme, core
name
- The name of the widgetGet a widget by name and type (defaults to `core|custom`)
name
- The name of the widgettype
- This can be one of the following: core, custom, theme, moduleGet a widget instance by name convention discovery - ~name = Layout - name@module = Module - name = Custom or Core
name
- The convention nameGet unique, sorted widget categories from main widget query returns Query
Get a widget category
name
- The name of the widgettype
- This can be one of the following: core, theme, moduleGet a widget icon representation
name
- The name of the widgettype
- This can be one of the following: core, theme, moduleGet widget rendering arguments
udf
- The target UDF to render out arguments forwidget
- The widget nametype
- The widget typeGet all installed widgets in ContentBox by looking at the following locations: - core - custom - active theme - registered modules
reload
- Widgets are lazy loaded, or you can force a reloadGet a query listing of widgets in a path
path
- The path to checkGet installed widgets as an array of names
onDIComplete
Discover modules widgets and attach records to incoming widget records
qRecords
- The records query to attach yourself toDiscover active theme widgets and attach records to incoming widget records
qRecords
- The records query to attach yourself toDiscover the custom location widgets
qRecords
- The records query to attach yourself totype
- The type to processRemove a widget from the custom locations
widgetFile
- The location of the widget to removeRip Extensions from file name
filename
- The target to ripcoldbox
coreWidgetsMap
coreWidgetsPath
customWidgetsMap
customWidgetsPath
log
moduleService
moduleSettings
settingService
themeService
wirebox
Upload a widget to the custom location
fileField
- The form file field to use