Class Layout
Defined in: layout.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Layout(name, definition)
The Layout class
The constructor parses the layout and divides them into containers (headerContents, bodyContents, dialogsContents).
|
Method Attributes | Method Name and Description |
---|---|
This methods returns the contents of the body part of the layout.
|
|
This methods returns the contents of the dialog part of the layout.
|
|
This methods returns the contents of the header part of the layout.
|
|
getName()
Gets the name of the layout.
|
|
This methods returns an associative array holding the contents of the different containers: header, body, footer and dialogs.
|
Class Detail
Layout(name, definition)
The Layout class
The constructor parses the layout and divides them into containers (headerContents, bodyContents, dialogsContents).
- Parameters:
- {String} name
- Name of the Layout (usually the same name as the Layout's controller).
- {String} definition
- Layout 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
{String}
getBodyContents()
This methods returns the contents of the body part of the layout.
- Returns:
- {String} The contents of the body part of the layout
{String}
getDialogsContents()
This methods returns the contents of the dialog part of the layout.
- Returns:
- {String} The contents of the dialog part of the layout
{String}
getHeaderContents()
This methods returns the contents of the header part of the layout.
- Returns:
- {String} The contents of the header part of the layout
{String}
getName()
Gets the name of the layout.
- Returns:
- {String} The name of the layout.
{Array}
getYields()
This methods returns an associative array holding the contents of the different containers: header, body, footer and dialogs.
- Returns:
- {Array} An associative array holding the contents of the different containers: header, body, footer and dialogs