lucee.Componentcontentbox.models.ui.AdminMenuService
ContentBox - A Modular Content Platform Copyright since 2012 by Ortus Solutions, Corp www.ortussolutions.com/products/contentbox --- Manages the admin menu services for the header and top menu
Property Summary | ||||
---|---|---|---|---|
type | property | default | serializable | required |
any
|
avatar
Injected Avatar.
|
true
|
false
|
|
array
|
headerMenu
This holds the header menu structure.
|
true
|
false
|
|
struct
|
headerMenuMap
This is a reference map of the headerMenu array.
|
true
|
false
|
|
array
|
profileMenu
This holds the profile menu structure.
|
true
|
false
|
|
array
|
supportMenu
This holds the support menu structure.
|
true
|
false
|
|
array
|
topMenu
This holds the top menu structure.
|
true
|
false
|
|
struct
|
topMenuMap
This is a reference map of the topMenu array.
|
true
|
false
|
|
array
|
utilsMenu
This holds the utils menu structure.
|
true
|
false
|
Constructor Summary | |
---|---|
init(any requestService, any coldbox)
Constructor. |
Method Summary | |
---|---|
AdminMenuService
|
addHeaderMenu(any name, any label, [any title=''], [any href='javascript:void( null )'], [any target=''], [any permissions=''], [any data='[runtime expression]'], [any class=''], [any id=''], [any itemType='a'], [any itemClass=''], [any itemId=''])
Add header top level menu. |
AdminMenuService
|
addHeaderSubMenu([any headerMenu], any name, any label, [any title=''], [any href='#'], [any target=''], [any permissions=''], [any data='[runtime expression]'], [any class=''], [any iid=''], [any itemType='a'], [any itemClass=''], [any itemId=''])
Add a sub level header menu. |
AdminMenuService
|
addSubMenu([any topMenu], any name, any label, [any title=''], [any href='#'], [any target=''], [any permissions=''], [any data='[runtime expression]'], [any class=''], [any id=''], [any itemType='a'], [any itemClass=''], [any itemId=''])
Add a sub level menu. |
AdminMenuService
|
addTopMenu(any name, any label, [any title=''], [any href='#'], [any target=''], [any permissions=''], [any data='[runtime expression]'], [any class=''], [any id=''], [any itemType='a'], [any itemClass=''], [any itemId=''])
Add top level menus. |
any
|
buildItemAttributes(any event, any menu, [any structDefaults='[runtime expression]'])
Build Item Attributes. |
any
|
buildLIAttributes(any event, any menu)
Build LI attributes. |
any
|
buildLink(any menu, any event)
Dynamic href's due to cgi host or site changes. |
any
|
buildModuleLink(string module, string linkTo, [any queryString=''], [boolean ssl='false'])
Build out ContentBox module links. |
any
|
buildProfileLabel()
Dynamic menu label. |
any
|
createAttributeList(struct attributes)
Create the attribute list. |
AdminMenuService
|
createDefaultMenu()
Create the default ContentBox menu. |
AdminMenuService
|
createHeaderMenu()
Create the default ContentBox header menu contributions. |
any
|
generateHeaderMenu()
Generate the header menu. |
any
|
generateMenu()
Generate main top admin menu navigation bar. |
any
|
generateProfileMenu()
Generate dynamic profile menu. |
any
|
generateSupportMenu()
Generate support menu: about. |
any
|
generateUtilsMenu()
Generate the utility menu. |
string
|
getAvatar()
|
string
|
getHeaderMenu()
|
string
|
getHeaderMenuMap()
|
string
|
getProfileMenu()
|
string
|
getSupportMenu()
|
string
|
getTopMenu()
|
string
|
getTopMenuMap()
|
string
|
getUtilsMenu()
|
string
|
parseADataAttributes(struct data)
Generate a flat representation of data elements. |
AdminMenuService
|
removeHeaderMenu(any headerMenu)
Remove a header top level menu. |
AdminMenuService
|
removeHeaderSubMenu(any headerMenu, any name)
Remove a sub level menu from the header. |
AdminMenuService
|
removeSubMenu(any topMenu, any name)
Remove a sub level menu. |
AdminMenuService
|
removeTopMenu(any topMenu)
Remove a top level menu. |
any
|
setAvatar(any avatar)
|
any
|
setHeaderMenu(array headerMenu)
|
any
|
setHeaderMenuMap(struct headerMenuMap)
|
any
|
setProfileMenu(array profileMenu)
|
any
|
setSupportMenu(array supportMenu)
|
any
|
setTopMenu(array topMenu)
|
any
|
setTopMenuMap(struct topMenuMap)
|
any
|
setUtilsMenu(array utilsMenu)
|
AdminMenuService
|
withHeaderMenu(any name)
Use a header menu. |
AdminMenuService
|
withTopMenu(any name)
|
Methods inherited from class lucee.Component |
---|
None |
Constructor Detail |
---|
Constructor
requestService
coldbox
Property Detail |
---|
Injected Avatar
access
- publicrequired
- falsereturntype
- anyinject
- Avatar@cbserializable
- trueThis holds the header menu structure
access
- publicrequired
- falsereturntype
- anyserializable
- trueThis is a reference map of the headerMenu array
access
- publicrequired
- falsereturntype
- anyserializable
- trueThis holds the profile menu structure
access
- publicrequired
- falsereturntype
- anyserializable
- trueThis holds the support menu structure
access
- publicrequired
- falsereturntype
- anyserializable
- trueThis holds the top menu structure
access
- publicrequired
- falsereturntype
- anyserializable
- trueThis is a reference map of the topMenu array
access
- publicrequired
- falsereturntype
- anyserializable
- trueThis holds the utils menu structure
access
- publicrequired
- falsereturntype
- anyserializable
- trueMethod Detail |
---|
Add header top level menu
name
- The unique name for this header level menulabel
- The label for the menu item, this can be a closure/udf and it will be called at generationtitle
- The optional title elementhref
- The href, if any to locate when clicked, this can be a closure/udf and it will be called at generationtarget
- The target to execute the link in, default is same page.permissions
- The list of permissions needed to view this menudata
- A structure of data attributes to add to the linkclass
- A CSS class list to append to the elementid
- An id to apply to the elementitemType
- The type of element to create (e.g., a tag, button, etc.)itemClass
- A CSS class list to append to the elementitemId
- An id to apply to the item elementAdd a sub level header menu
headerMenu
- The optional header menu name to add this sub level menu to or if concatenated then it uses that one.name
- The unique name for this sub level menulabel
- The label for the menu itemtitle
- The optional title elementhref
- The href, if any to locate when clickedtarget
- The target to execute the link in, default is same page.permissions
- The list of permissions needed to view this menudata
- A structure of data attributes to add to the linkclass
- A CSS class list to append to the elementiid
itemType
- The type of element to create (e.g., a tag, button, etc.)itemClass
- A CSS class list to append to the elementitemId
- An id to apply to the item elementAdd a sub level menu
topMenu
- The optional top menu name to add this sub level menu to or if concatenated then it uses that one.name
- The unique name for this sub level menulabel
- The label for the menu item, this can be a closure/udf and it will be called at generationtitle
- The optional title elementhref
- The href, if any to locate when clicked, this can be a closure/udf and it will be called at generationtarget
- The target to execute the link in, default is same page.permissions
- The list of permissions needed to view this menudata
- A structure of data attributes to add to the linkclass
- A CSS class list to append to the elementid
- An id to apply to the elementitemType
- The type of element to create (e.g., a tag, button, etc.)itemClass
- A CSS class list to append to the elementitemId
- An id to apply to the item elementAdd top level menus
name
- The unique name for this top level menulabel
- The label for the menu item, this can be a closure/udf and it will be called at generationtitle
- The optional title elementhref
- The href, if any to locate when clicked, this can be a closure/udf and it will be called at generationtarget
- The target to execute the link in, default is same page.permissions
- The list of permissions needed to view this menudata
- A structure of data attributes to add to the linkclass
- A CSS class list to append to the elementid
- An id to apply to the elementitemType
- The type of element to create (e.g., a tag, button, etc.)itemClass
- A CSS class list to append to the elementitemId
- An id to apply to the item elementBuild Item Attributes
event
- The event contextmenu
- The menu structstructDefaults
- The struct defaults for the itemBuild LI attributes
event
- The event contextmenu
- The menu structDynamic href's due to cgi host or site changes. This expects a menu.href_to or menu.href_jsAction to exist.
menu
- The menu infoevent
- The request contextBuild out ContentBox module links
module
- The module namelinkTo
- The linkqueryString
- The query stringssl
- Using ssl or notDynamic menu label
Create the attribute list
attributes
- The struct of attributes to build the list fromCreate the default ContentBox menu
Create the default ContentBox header menu contributions
Generate the header menu
Generate main top admin menu navigation bar
Generate dynamic profile menu
Generate support menu: about
Generate the utility menu
Generate a flat representation of data elements
data
- The data structRemove a header top level menu
headerMenu
- The header menu unique name to removeRemove a sub level menu from the header
headerMenu
- The optional header menu name to remove fromname
- The sub menu to removeRemove a sub level menu
topMenu
- The optional top menu name to add this sub level menu to or if concatenated then it uses that one.name
- The unique name for this sub level menuRemove a top level menu
topMenu
- The optional top menu name to add this sub level menu to or if concatenated then it uses that one.avatar
headerMenu
headerMenuMap
profileMenu
supportMenu
topMenu
topMenuMap
utilsMenu
Use a header menu
name
- The name of the header menuname
- The name of the top menu