Members
-
<readonly> registered :Object.<string, Object>
An object containing all registered paging types.
-
Examples
The following shows the structure of this object. The
<name>placeholders would be the name the class was registered with.{ "<name>": { "name": <string>, "klass": <function>, "ctrl": <function>, "priority": <number> }, "<name>": { "name": <string>, "klass": <function>, "ctrl": <function>, "priority": <number> }, ... }Details
Methods
-
register( name, type [, ctrl [, options [, classes [, il8n [, priority ] ] ] ] ] ) → {boolean}
Registers a paging
typeconstructor with the factory using the givennameandtestfunction. -
Parameters
Name Type Attributes Default Description namestring The friendly name of the class.
typeFooGallery.Paging The paging type constructor to register.
ctrlFooGallery.PagingControl <optional> An optional control to register for the paging type.
optionsobject <optional> {} The default options for the paging type.
classesobject <optional> {} The CSS classes for the paging type.
il8nobject <optional> {} The il8n strings for the paging type.
prioritynumber <optional> 0 This determines the index for the class when using either the load or names methods, a higher value equals a lower index.
Returns
Details
-
hasCtrl( name ) → {boolean}
Checks if the factory contains a control registered using the supplied
name. -
Parameters
Name Type Description namestring The friendly name of the class.
Returns
Details
-
makeCtrl( name, template, parent, position ) → {FooGallery.PagingControl}
Create a new instance of a control class registered with the supplied
nameand arguments. -
Parameters
Name Type Description namestring The friendly name of the class.
templateFooGallery.Template The template creating the control.
parentFooGallery.Paging The parent paging class creating the control.
positionstring The position the control will be displayed at.
Returns
Details