Documentation · ViewHelper reference

XSD schema file | vhs master

Iterator / PushViewHelper

Adds one variable to the end of the array and returns the result.

Example:

<f:for each="{array -> v:iterator.push(add: additionalObject, key: 'newkey')}" as="combined">
...
</f:for>

/

  • Tag usage example

    <v:iterator.push subject="[mixed]" add="[mixed]" key="[mixed]" as="NULL">
    	<!-- tag content - may be ignored! -->
    </v:iterator.push>
  • Inline usage example

    {v:iterator.push(subject: [mixed], add: [mixed], key: [mixed], as: 'NULL')}

Arguments

Argument Description Type
add

Member to add to end of array

mixed
as

Template variable name to assign; if not specified the ViewHelper returns the variable instead.

string
key

Optional key to use. If key exists the member will be overwritten!

mixed
subject

Input to work on - Array/Traversable/...

mixed
Required attribute

Revision history