Class Index | File Index

Classes


Class ContentElement


Defined in: contentElement.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
ContentElement(group, view, parser, renderer)
The ContentElement represents "content" parts of a view; it may itself contain one or more ContentElements.
Field Summary
Field Attributes Field Name and Description
 
 
The "raw" template text.
 
 
 
 
 
List of the "localize" statements in the template.
 
the "localizer" i.e.
 
 
 
Method Summary
Method Attributes Method Name and Description
 
Gets the controller for this ContentElement.
 
 
 
Gets the name of a mmir.ContentElement object (content, header, footer, dialogs, .
 
 
 
Gets the owner for this ContentElement, i.e.
 
 
create a String representation for this content element.
 
Gets the definition of a mmir.ContentElement object.
 
toStrings(renderingBuffer, data)
Renders this object into the renderingBuffer.
Class Detail
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.
Parameters:
{Array|Object} group
an array or object with properties name {String}, and content {String}
{Object} view
the view that owns this ContentElement-element
{mmir.parser.ParserUtils} parser
for the the content (optional) if supplied this object must have a function parse({String}) (see templateParseUtil)
{mmir.parser.RenderUtils} renderer
for the the content (optional) if supplied, a parser must also be supplied; the renderer must have a function parse({String}) (see templateRenderUtil)
Field Detail
{mmir.parser.ParsingResult} this.comments
See:
mmir.parser.element.COMMENT

{String} this.definition
The "raw" template text.

{mmir.parser.ParsingResult} this.escapes
See:
mmir.parser.element.ESCAPE_ENTER
mmir.parser.element.ESCAPE_EXIT

{mmir.parser.ParsingResult} this.fors
See:
mmir.parser.element.FOR

{mmir.parser.ParsingResult} this.helpers
See:
mmir.parser.element.HELPER

{mmir.parser.ParsingResult} this.ifs
See:
mmir.parser.element.IF

{mmir.parser.ParsingResult} this.localizations
List of the "localize" statements in the template.
See:
mmir.parser.element.LOCALIZE

{mmir.LanguageManager} this.localizer
the "localizer" i.e. for handeling internationalization / localized Strings

{mmir.parser.ParsingResult} this.scriptBlocks
See:
mmir.parser.element.BLOCK

{mmir.parser.ParsingResult} this.scriptStatements
See:
mmir.parser.element.STATEMENT

{mmir.parser.ParsingResult} this.vars
See:
mmir.parser.element.VAR_DECLARATION
Method Detail
{mmir.Controller} getController()
Gets the controller for this ContentElement.
Returns:
{mmir.Controller} the Controller of the owning view

{String} getDefinition()
Deprecated:
use #getRawText instead
Returns:
{String} the raw text from which this content element was parsed
See:
#getRawText

{Number} getEnd()
Returns:
{Number} the end position for this content Element within #getRawText

{String} getName()
Gets the name of a mmir.ContentElement object (content, header, footer, dialogs, ...).
Returns:
{String} Name - used by yield tags in layout

{String} getRawText()
Returns:
{String} the raw text from which this content element was parsed
See:
#getDefinition

{Number} getStart()
Returns:
{Number} the start position for this content Element within #getRawText

{mmir.View} getView()
Gets the owner for this ContentElement, i.e. the mmir.View object.
Returns:
{mmir.View} the owning View

{Boolean} hasDynamicContent()
Returns:
{Boolean} returns true if this ContentElement conatains dynamic content, i.e. if it needs to be "evaluated" for rendering (otherwise, its plain text representation can be used for rendering)

{String} stringify()
create a String representation for this content element.
Returns:
{String} the string-representation
Requires:
StorageUtils
RenderUtils

{String} toHtml()
Gets the definition of a mmir.ContentElement object. TODO remove this?
Returns:
{String} The HTML content.

{Array} toStrings(renderingBuffer, data)
Renders this object into the renderingBuffer.
Parameters:
renderingBuffer
{Array} of Strings (if null a new buffer will be created)
data
{Any} (optional) the event data with which the rendering was invoked
Returns:
{Array} of Strings the renderingBuffer with the contents of this object added at the end

Documentation generated by JsDoc Toolkit 2.4.0 on Fri Feb 26 2016 21:33:47 GMT+0100 (Mitteleuropäische Zeit)