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:
-
standardPillsArraylist of pills
-
siteNameStringname 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:
-
keyStringThe key to retrieve
-
lsObjectThe localization object
-
activePillStringThe 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:
-
keyStringThe key to retrieve
-
lsObjectThe localization object
-
activePillStringThe name of the active sub-nav pill
-
[data]Object optionalData object to send to the callback function (Must include field named "site")
-
cbFunctionYields resulting subnav items
registerFor
-
key -
getSubNavItems
Register a callback with the service
Parameters:
-
keyStringThe key to register
-
getSubNavItemsFunctionThe callback function
unregisterFor
-
key -
Function
Unregisters a callback function
Parameters:
-
keyString -
FunctionFunctionto unregister
Returns:
TRUE if function was unregistered, FALSE if not
