Class opFOREACH
Extends
BaseArray.
A class represent: {#foreach}.
Defined in: jtemplates.js.
Constructor Attributes | Constructor Name and Description |
---|---|
opFOREACH(oper, par, template)
Create a new loop node.
|
Method Attributes | Method Name and Description |
---|---|
get(d, param, element, deep)
Process loop and get the html string.
|
|
Get a parent node.
|
|
push(e)
Add node 'e' to array.
|
|
Switch from collection onTrue to onFalse.
|
Class Detail
opFOREACH(oper, par, template)
Create a new loop node.
- Parameters:
- {string} oper
- content of operator {#..}
- {object} par
- parent node
- {Template} template
- a pointer to Template object
Method Detail
{String}
get(d, param, element, deep)
Process loop and get the html string.
- Parameters:
- {object} d
- data
- {object} param
- parameters
- {Element} element
- a HTML element
- {Number} deep
- Returns:
- {String}
{BaseNode}
getParent()
Get a parent node.
- Returns:
- {BaseNode}
push(e)
Add node 'e' to array.
- Parameters:
- {BaseNode} e
switchToElse()
Switch from collection onTrue to onFalse.