ContentBox Core API 1.5.7

contentbox.model.ui
Class AdminMenuService

WEB-INF.cftags.component
        extended by contentbox.model.ui.AdminMenuService

public class AdminMenuService
extends WEB-INF.cftags.component

******************************************************************************* 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


Constructor Summary
init(any requestService, any coldbox)
          Constructor
 
Method Summary
 array GETMENU()
 any GETREQUESTSERVICE()
 struct GETTOPMENUMAP()
 void SETMENU(array menu)
 void SETREQUESTSERVICE(any requestService)
 void SETTOPMENUMAP(struct topMenuMap)
 AdminMenuService addSubMenu([any topMenu], any name, any label, [any title=''], [any href='#'], [any target=''], [any permissions=''], [any data='[runtime expression]'])
          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]'])
          Add top level menus
 any buildModuleLink(string module, string linkTo, [any queryString=''], [boolean ssl='false'])
          Build out ContentBox module links
 AdminMenuService createDefaultMenu()
          Create the default ContentBox menu
 any generateMenu()
          Generate menu from cache or newly generated menu
 string parseADataAttributes(Struct data)
 AdminMenuService removeSubMenu(any topMenu, any name)
          Remove a sub level menu
 AdminMenuService removeTopMenu(any topMenu)
          Remove a top level menu
 AdminMenuService withTopMenu(any name)
          Use a top menu
 
Methods inherited from class WEB-INF.cftags.component
 

Constructor Detail

init

public init(any requestService, any coldbox)
Constructor

Parameters:
requestService
coldbox
Method Detail

GETMENU

public array GETMENU()


GETREQUESTSERVICE

public any GETREQUESTSERVICE()


GETTOPMENUMAP

public struct GETTOPMENUMAP()


SETMENU

public void SETMENU(array menu)

Parameters:
menu

SETREQUESTSERVICE

public void SETREQUESTSERVICE(any requestService)

Parameters:
requestService

SETTOPMENUMAP

public void SETTOPMENUMAP(struct topMenuMap)

Parameters:
topMenuMap

addSubMenu

public AdminMenuService addSubMenu([any topMenu], any name, any label, [any title=''], [any href='#'], [any target=''], [any permissions=''], [any data='[runtime expression]'])
Add a sub level menu

Parameters:
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 menu
label - The label for the menu item
title - The optional title element
href - The href, if any to locate when clicked
target - The target to execute the link in, default is same page.
permissions - The list of permissions needed to view this menu
data - A structure of data attributes to add to the link

addTopMenu

public AdminMenuService addTopMenu(any name, any label, [any title=''], [any href='javascript:null()'], [any target=''], [any permissions=''], [any data='[runtime expression]'])
Add top level menus

Parameters:
name - The unique name for this top level menu
label - The label for the menu item
title - The optional title element
href - The href, if any to locate when clicked
target - The target to execute the link in, default is same page.
permissions - The list of permissions needed to view this menu
data - A structure of data attributes to add to the link

buildModuleLink

public any buildModuleLink(string module, string linkTo, [any queryString=''], [boolean ssl='false'])
Build out ContentBox module links

Parameters:
module
linkTo
queryString
ssl

createDefaultMenu

public AdminMenuService createDefaultMenu()
Create the default ContentBox menu


generateMenu

public any generateMenu()
Generate menu from cache or newly generated menu


parseADataAttributes

public string parseADataAttributes(Struct data)

Parameters:
data

removeSubMenu

public AdminMenuService removeSubMenu(any topMenu, any name)
Remove a sub level menu

Parameters:
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 menu

removeTopMenu

public AdminMenuService removeTopMenu(any topMenu)
Remove a top level menu

Parameters:
topMenu - The optional top menu name to add this sub level menu to or if concatenated then it uses that one.

withTopMenu

public AdminMenuService withTopMenu(any name)
Use a top menu

Parameters:
name

ContentBox Core API 1.5.7