input|insert( offset, element1 [, element2 [, ... ] ] )
Name | Type | Description | Required |
---|---|---|---|
offset | integer | The offset where the element(s) should be inserted at. | Yes. |
element1 | any | An element that should be inserted into the existing array. | Yes. |
element2 | any | Another element that should be inserted into the existing array. | No. |
This operator inserts an element or a sequence of elements at a specified position within the input. The resulting array will be returned (original array with the inserted values).
{array( 1, 2, 5 )|insert( 2, 3, 4 )}
The following array will be returned: ( 1, 2, 3, 4, 5 ).
Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2013 eZ Systems AS (except where otherwise noted). All rights reserved.