new mmir.view.Partial(ctrl, name, definition)
The Partial class is a containing the definition of the partial and methods to access the definition.
Name | Type | Description |
---|---|---|
ctrl |
Object | Controller instance / object |
name |
String | Name of the Partial |
definition |
String | 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
- module:if
- module:if
Methods
-
getContentElement(){mmir.view.ContentElement}
-
Gets the
mmir.view.ContentElement
, i.e. the content that this instance represents.Returns:
Type Description mmir.view.ContentElement The ContentElement object -
getController(){Object}
-
Gets the controller of a partial - each partial is assigned to a specific controller, although they can be used from different controllers.
Returns:
Type Description Object The controller of the partial -
getDefinition(){String}
-
Gets the definition of a partial.
Returns:
Type Description String The partial description string -
getName(){String}
-
Gets the name of a partial.
Returns:
Type Description String The name of the partial -
stringify(disableStrictMode){String}
-
Gets the
mmir.view.ContentElement
, i.e. the content that this instance represents.Name Type Description disableStrictMode
Boolean optional OPTIONAL disable JavaScript strict mode in the generated view code Returns:
Type Description String the stringified representation for the Partial