railo-context.Component
contentbox.model.ui.AdminMenuService
ContentBox - A Modular Content Platform Copyright 2012 by Luis Majano and Ortus Solutions, Corp www.gocontentbox.org | www.luismajano.com | www.ortussolutions.com Apache License, Version 2.0 Copyright Since [2012] [Luis Majano and Ortus Solutions,Corp] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 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
|
topMenu
This holds the top menu structure. |
true
|
false
|
|
struct
|
topMenuMap
This is a reference map of the topMenu array. |
true
|
false
|
|
| Constructor Summary | |
|---|---|
|
init(any requestService, any coldbox)
Constructor. |
|
| Method Summary | |
|---|---|
AdminMenuService
|
addHeaderMenu(any name, any label, [any title=''], [any href='javascript:null()'], [any target=''], [any permissions=''], [any data='[runtime expression]'], [any class=''])
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=''])
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=''])
Add a sub level menu. |
AdminMenuService
|
addTopMenu(any name, any label, [any title=''], [any href='javascript:null()'], [any target=''], [any permissions=''], [any data='[runtime expression]'], [any class=''])
Add top level menus. |
any
|
buildModuleLink(string module, string linkTo, [any queryString=''], [boolean ssl='false'])
Build out ContentBox module links. |
any
|
buildProfileLabel()
Dynamic menu label. |
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 menu from cache or newly generated menu. |
string
|
getAvatar()
get: Injected Avatar. |
string
|
getHeaderMenu()
get: This holds the header menu structure. |
string
|
getHeaderMenuMap()
get: This is a reference map of the headerMenu array. |
string
|
getTopMenu()
get: This holds the top menu structure. |
string
|
getTopMenuMap()
get: This is a reference map of the topMenu array. |
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)
set: Injected Avatar. |
any
|
setHeaderMenu(array headerMenu)
set: This holds the header menu structure. |
any
|
setHeaderMenuMap(struct headerMenuMap)
set: This is a reference map of the headerMenu array. |
any
|
setTopMenu(array topMenu)
set: This holds the top menu structure. |
any
|
setTopMenuMap(struct topMenuMap)
set: This is a reference map of the topMenu array. |
AdminMenuService
|
withHeaderMenu(any name)
Use a header menu. |
AdminMenuService
|
withTopMenu(any name)
|
| Methods inherited from class railo-context.Component |
|---|
| None |
| Constructor Detail |
|---|
Constructor
requestServicecoldbox| Property Detail |
|---|
Injected Avatar
required - falseinject - coldbox:myplugin:Avatar@contentboxserializable - trueThis holds the header menu structure
required - falseserializable - trueThis is a reference map of the headerMenu array
required - falseserializable - trueThis holds the top menu structure
required - falseserializable - trueThis is a reference map of the topMenu array
required - falseserializable - true| Method 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 linkclassAdd 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 linkclassAdd 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 linkclassAdd 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 linkclassBuild out ContentBox module links
modulelinkToqueryStringsslDynamic menu label
Create the default ContentBox menu
Create the default ContentBox header menu contributions
Generate the header menu
Generate menu from cache or newly generated menu
get: Injected Avatar
get: This holds the header menu structure
get: This is a reference map of the headerMenu array
get: This holds the top menu structure
get: This is a reference map of the topMenu array
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.set: Injected Avatar
avatarset: This holds the header menu structure
headerMenuset: This is a reference map of the headerMenu array
headerMenuMapset: This holds the top menu structure
topMenuset: This is a reference map of the topMenu array
topMenuMapUse a header menu
name - The name of the header menuname - The name of the top menu