input|contains( element )
Name | Type | Description | Required |
---|---|---|---|
element | any | The element that should be matched. | Yes. |
This operator checks if the input array contains a specific element (specified using the first parameter). If it does, the operator will return TRUE, otherwise FALSE will be returned.
{array( 1, 2, 3, 4, 5 )|contains( 3 )}
Returns TRUE.
{array( 1, array( 3, 4 ), 5 )|contains( array( 3, 4 ) )}
Returns TRUE.
{array( 1, array( 3, 4 ), 5 )|contains( 3 )}
Returns FALSE.
Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2013 eZ Systems AS (except where otherwise noted). All rights reserved.