API Docs for: 0.8.0
Show:

SectionService Class

Service for managing the site's navigation

Constructor

SectionService

(
  • options
)

Parameters:

  • options Object
    • site String

      uid

    • onlyThisSite Boolean

      should section service only return value set specifically by site rather than defaulting to global

Methods

_removeFromSectionMap

(
  • sid
  • sectionMap
)
private

Parameters:

  • sid String
  • sectionMap Array

deleteChildren

(
  • parentId
  • cb
)

Parameters:

  • parentId String
  • cb Function

formatUrl

(
  • navItem
)
static

Parameters:

  • navItem Object

getFormattedSections

(
  • localizationService
  • [currUrl]
  • cb
)

Parameters:

  • localizationService Localization
  • [currUrl] String optional
  • cb Function

getParentSelectList

(
  • currItem
  • cb
)

Parameters:

  • currItem String | ObjectID
  • cb Function

getPillNavOptions

(
  • activePill
)
Array static

Parameters:

  • activePill String

Returns:

Array:

getSectionData

(
  • uid
  • navItems
  • currUrl
)
static

Parameters:

  • uid String
  • navItems Object
  • currUrl String

getSectionMapIndex

(
  • sid
  • sectionMap
)
Object private

Parameters:

  • sid String
  • sectionMap Array

Returns:

Object:

(
  • ls
)
Array static

Parameters:

Returns:

Array:

isValidType

(
  • type
)
Boolean static

Parameters:

  • type String | Object

Returns:

Boolean:

removeFromSectionMap

(
  • section
  • [sectionMap]
  • cb
)

Parameters:

  • section Object
  • [sectionMap] Array optional
  • cb Function

save

(
  • navItem
  • [options]
  • cb
)

Parameters:

  • navItem Object
  • [options] Object optional
  • cb Function

trimForType

(
  • navItem
)
static

Parameters:

  • navItem Object

updateNavMap

(
  • section
  • cb
)

Parameters:

  • section Object
  • cb Function

validate

(
  • navItem
  • cb
)

Parameters:

  • navItem Object
  • cb Function

validateContentNavItem

(
  • navItem
  • cb
)

Parameters:

  • navItem Object
  • cb Function

validateLinkNavItem

(
  • navItem
  • cb
)

Parameters:

  • navItem Object
  • cb Function

validateNavItemContent

(
  • type
  • content
  • cb
)

Parameters:

  • type String
  • content String
  • cb Function

validateNavItemEditor

(
  • editor
  • cb
)

Parameters:

  • editor String
  • cb Function

validateNavItemName

(
  • navItem
  • cb
)

Parameters:

  • navItem Object
  • cb Function

validateNavItemParent

(
  • parent
  • cb
)

Parameters:

  • parent String
  • cb Function

validateSectionNavItem

(
  • navItem
  • cb
)

Parameters:

  • navItem Object
  • cb Function

Properties

VALID_TYPES

Object private static