Class TemplateManager
- Extends:
- EventDispatcher
- Requires:
- Class
- Event
- EventDispatcher
- JsonRpcError
- Template
- Defined in:
- TemplateManager.js
Responsible for managing templates.
Constructor
Static Fields
| Field | |
|---|---|
|
TemplateManager.ERROR
[constant]
|
|
|
TemplateManager.JQTEMPLATE
[constant]
|
|
|
TemplateManager.RENDERED
[constant]
|
Static Methods
| Method | |
|---|---|
|
TemplateManager.createTemplate(name, configuration)
Makes new template of specific type.
|
Methods
| Method | |
|---|---|
|
abort(error)
Aborts rendering current tree.
|
|
|
addEventListener(type, callbackFunction, context)
Adding listener
|
|
addTemplate(template)
Adds a template to collection
|
|
|
Dispatches event
|
|
getTemplateByName(name)
Returns template instance by given name
|
|
|
Return templates content object.
|
|
|
hasEventListener(type)
Checks if given event type listener is registered
|
|
Indicates if rendering process was aborded.
|
|
|
removeAllEventListeners(type)
Remove group of listeners or all listeners
|
|
removeEventListener(type, callbackFunction)
Remove listener
|
|
removeTemplate(template)
Removes template from collecion
|
Static Field Details
TemplateManager.ERROR
[constant]
TemplateManager.JQTEMPLATE
[constant]
TemplateManager.RENDERED
[constant]
Static Method Details
Makes new template of specific type.
Factory method
| Parameters (optional) | ||
|---|---|---|
| name | {string} | Template's name/file path |
| configuration | {object} | Configuration of transformation rule |
- Returns:
- {Template}
Method Details
abort(error)
Aborts rendering current tree. Dispatchig TemplateManager.RENDERED
| Parameters (optional) | ||
|---|---|---|
| error | ||
addTemplate(template)
:{boolean}
Adds a template to collection
| Parameters (optional) | ||
|---|---|---|
| template | {Template} | |
- Throws:
- {TemplateManager.Exception.TEMPLATE_HAS_TO_INHERIT}
- Returns:
- {boolean}
Returns template instance by given name
| Parameters (optional) | ||
|---|---|---|
| name | {string} | templates name |
- Throws:
- {TemplateManager.Exception.NAME_MUST_BE_A_STRING}
- Returns:
- {Template|null}
getTemplatesContent()
:{Object}
Return templates content object.
- Returns:
- {Object}
isAborted()
:{boolean}
Indicates if rendering process was aborded.
- Returns:
- {boolean}
removeTemplate(template)
:{boolean}
Removes template from collecion
| Parameters (optional) | ||
|---|---|---|
| template | {Template} | |
- Throws:
- {TemplateManager.Exception.TEMPLATE_HAS_TO_INHERIT}
- Returns:
- {boolean}
Documentation generated by JsDoc Toolkit 2.4.0 on Wed Aug 17 2011 15:33:34 GMT+0200 (CEST)