API Docs for: 0.8.0
Show:

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

Properties

Methods

addSiteToPills

(
  • standardPills
  • siteName
)
Array static

Add a site name pill to existing pills

Parameters:

  • standardPills Array

    list of pills

  • siteName String

    name of the site to add to the pill

Returns:

Array:

a list of pills with site name added

get

(
  • key
  • ls
  • activePill
  • [data]
)
Object static

Retrieves the sub-nav items

Parameters:

  • key String

    The key to retrieve

  • ls Object

    The localization object

  • activePill String

    The name of the active sub-nav pill

  • [data] Object optional

    Data object to send to the callback function

Returns:

Object:

The sub-nav items

getWithSite

(
  • key
  • ls
  • activePill
  • [data]
  • cb
)
static

Retrieves the sub-nav items with selcted site

Parameters:

  • key String

    The key to retrieve

  • ls Object

    The localization object

  • activePill String

    The name of the active sub-nav pill

  • [data] Object optional

    Data object to send to the callback function (Must include field named "site")

  • cb Function

    Yields resulting subnav items

registerFor

(
  • key
  • getSubNavItems
)
static

Register a callback with the service

Parameters:

  • key String

    The key to register

  • getSubNavItems Function

    The callback function

unregisterFor

(
  • key
  • Function
)
Boolean static

Unregisters a callback function

Parameters:

  • key String
  • Function Function

    to unregister

Returns:

Boolean:

TRUE if function was unregistered, FALSE if not

Properties

CALLBACKS

Object private static