Class: ContentElement

ContentElement

new mmir.view.ContentElement(group, view, parser, renderer)

The ContentElement represents "content" parts of a view; it may itself contain one or more ContentElements. This class holds the name of the content-field (used via the yield-tag in the layouts: content, header, footer, dialogs, ...) and its definition as HTML-String.
Name Type Description
group Array | Object an array or object with properties name {String}, and content {String}
view Object the view that owns this ContentElement-element
parser mmir.parser.ParserUtils for the the content (optional) if supplied this object must have a function parse({String}) (see templateParseUtil)
renderer mmir.parser.RenderUtils for the the content (optional) if supplied, a parser must also be supplied; the renderer must have a function parse({String}) (see templateRenderUtil)

Members

protectedcommentsmmir.parser.ParsingResult

See:

protecteddefinitionString

The "raw" template text.

protectedescapesmmir.parser.ParsingResult

See:
See:

protectedhelpersmmir.parser.ParsingResult

See:
See:

protectedlocalizationsmmir.parser.ParsingResult

List of the "localize" statements in the template.
See:

protectedlocalizermmir.LanguageManager

the "localizer" i.e. for handeling internationalization / localized Strings

protectedparsermmir.parser.ParserUtils

protectedpartialsmmir.parser.ParsingResult

See:

protectedrenderermmir.parser.RenderUtils

protectedscriptBlocksmmir.parser.ParsingResult

See:

protectedscriptStatementsmmir.parser.ParsingResult

See:

protectedviewmmir.view.View

protectedyields

NOTE by default this field is not added to the allContentElements list (i.e. will not be stored/stringified)

Methods

Gets the name of a mmir.view.ContentElement object (content, header, footer, dialogs, ...).
Returns:
Type Description
String Name - used by yield tags in layout
Gets the owner for this ContentElement, i.e. the mmir.view.View object.
Returns:
Type Description
mmir.view.View the owning View