Class Partial
Defined in: partial.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Partial(ctrl, name, definition)
The Partial class is a containing the definition of the partial and methods to access the definition.
|
Method Attributes | Method Name and Description |
---|---|
Gets the mmir.ContentElement, i.e.
|
|
Gets the controller of a partial - each partial is assigned to a specific controller, although they can be used from different controllers.
|
|
Gets the definition of a partial.
|
|
getName()
Gets the name of a partial.
|
Class Detail
Partial(ctrl, name, definition)
The Partial class is a containing the definition of the partial and methods to access the definition.
- Parameters:
- {Object} ctrl
- Controller instance / object
- {String} name
- Name of the Partial
- {String} definition
- Partial description, i.e. the raw template code that will be processed. May be empty: in this case the processed contents must be added manually (cf. parser.StorageUtils)
- Requires:
- if param definition is NOT empty: parser.RenderUtils (must be loaded beforehand via
require(["renderUtils"]...
) - if param definition is NOT empty: parser.ParseUtils (must be loaded beforehand via
require(["parseUtils"]...
)
Method Detail
{mmir.ContentElement}
getContentElement()
Gets the mmir.ContentElement, i.e. the content that this instance represents.
- Returns:
- {mmir.ContentElement} The ContentElement object
{Object}
getController()
Gets the controller of a partial - each partial is assigned to a specific controller, although they can be used from different controllers.
- Returns:
- {Object} The controller of the partial
{String}
getDefinition()
Gets the definition of a partial.
- Returns:
- {String} The partial description string
{String}
getName()
Gets the name of a partial.
- Returns:
- {String} The name of the partial