AdminSubnavService Class
Provides the ability to manage the admin section's sub-nav. It manages callbacks for specific areas of the admin section that will build a structure to represent the sub-nav. This sub nav, when retrieved will combine all registrants' pills into a single structure which can then be rendered in a UI.
Item Index
Methods
- addSiteToPills static
- get static
- getWithSite static
- registerFor static
- unregisterFor static
Properties
- CALLBACKS static
Methods
addSiteToPills
-
standardPills
-
siteName
Add a site name pill to existing pills
Parameters:
-
standardPills
Arraylist of pills
-
siteName
Stringname of the site to add to the pill
Returns:
a list of pills with site name added
get
-
key
-
ls
-
activePill
-
[data]
Retrieves the sub-nav items
Parameters:
-
key
StringThe key to retrieve
-
ls
ObjectThe localization object
-
activePill
StringThe name of the active sub-nav pill
-
[data]
Object optionalData object to send to the callback function
Returns:
The sub-nav items
getWithSite
-
key
-
ls
-
activePill
-
[data]
-
cb
Retrieves the sub-nav items with selcted site
Parameters:
-
key
StringThe key to retrieve
-
ls
ObjectThe localization object
-
activePill
StringThe name of the active sub-nav pill
-
[data]
Object optionalData object to send to the callback function (Must include field named "site")
-
cb
FunctionYields resulting subnav items
registerFor
-
key
-
getSubNavItems
Register a callback with the service
Parameters:
-
key
StringThe key to register
-
getSubNavItems
FunctionThe callback function
unregisterFor
-
key
-
Function
Unregisters a callback function
Parameters:
-
key
String -
Function
Functionto unregister
Returns:
TRUE if function was unregistered, FALSE if not