Methods
getCurrentPage() → {string}
#
Get the title of the currently selected page
Returns:
Page title
- Type
- string
getCurrentSource() → {string}
#
Get the current source
Returns:
Current source
- Type
- string
getGroupedPagesForCurrentTitle() → {Array.<string>}
#
Get the list of page titles associated with the current group title.
Returns:
Page titles
- Type
- Array.<string>
getGroupedPagesForTitle(source, title) → {Array.<string>}
#
Get the list of page titles associated with one group title.
Parameters:
Name | Type | Description |
---|---|---|
source |
string | Symbolic name of the source |
title |
string | Group title |
Returns:
Page titles
- Type
- Array.<string>
getSourcePages(source) → {Object}
#
Get all pages in a source
Parameters:
Name | Type | Description |
---|---|---|
source |
string | Symbolic name of the source |
Returns:
Page definitions in this source
- Type
- Object
getSourceTitle(source) → {string}
#
Get the title of a source
Parameters:
Name | Type | Description |
---|---|---|
source |
string | Symbolic name of the source |
Returns:
Source title
- Type
- string
getSourceTotalCount(source) → {number}
#
Get the total count of a source
Parameters:
Name | Type | Description |
---|---|---|
source |
string | Symbolic name of the source |
Returns:
Total count
- Type
- number
getSourcesArray() → {Array.<string>}
#
reset()
#
Reset the data
setAllSources(sourceData)
#
Set all sources and pages. This will also reset and override any previously set information.
Parameters:
Name | Type | Description |
---|---|---|
sourceData |
Object | A detailed object about sources and pages |
Fires:
setCurrentSourcePage(source, page)
#
Set the current source and page.
Parameters:
Name | Type | Description |
---|---|---|
source |
string | New source |
page |
string | New page |
Fires:
setSourcePagesDetails(source, details)private
#
Set the details of a source and its page definitions
Parameters:
Name | Type | Description |
---|---|---|
source |
string | Source symbolic name |
details |
Object | Details object |
Events
update()
#
The state of the source page model has changed