Documentation · ViewHelper reference

XSD schema file | vhs master

Iterator / LastViewHelper

Returns the last element of $haystack. /

  • Tag usage example

    <v:iterator.last haystack="[mixed]">
    	<!-- tag content - may be ignored! -->
    </v:iterator.last>
  • Inline usage example

    {v:iterator.last(haystack: [mixed])}

Arguments

Argument Description Type
haystack

Haystack in which to look for needle

mixed
Required attribute

Revision history

commit 542b285a13c3bae5b726f7ce50f8324457631c51
Author: Claus Due <*****@wildside.dk>
Date:   Sat Nov 3 16:27:35 2012 +0100

    [FEATURE] Iterator ViewHelpers
    
    Explode, Implode, First, Last, IndexOf, Next, Previous, Loop and Sort
    ViewHelpers.

commit c97f64595c22294d902f0ae921d0f4d280b8076a
Author: Claus Due <*****@wildside.dk>
Date:   Mon Nov 5 01:35:41 2012 +0100

    [BUGFIX] Fix inheritance, Iterator ViewHelpers

commit aa32ca2050a4ac2d8ff0a2183b316c7c0f2477ed
Author: Björn Fromme <*****@bjo3rn.com>
Date:   Sun May 26 16:00:15 2013 +0200

    [TASK] A*****@throws annotations

commit 7fa3cfb4fb1c6a4cd593253217ad95c4e4557e58
Author: Björn Fromme <*****@bjo3rn.com>
Date:   Thu Jul 4 11:38:19 2013 +0200

    [TASK] Enable inline usage

commit 56d1a8b1102564bfd776a9aa76e17c0ec42535c0
Author: Björn Fromme <*****@bjo3rn.com>
Date:   Thu Jul 4 15:06:03 2013 +0200

    [TASK] Add early return to avoid PHP warnings for NULL values

commit f8499587a2e1e9981d3f43df9dff7da750f7a398
Author: Björn Fromme <*****@bjo3rn.com>
Date:   Thu Jul 4 15:08:21 2013 +0200

    [TASK] Inherit relocated class

commit 588c3cb62a905187eec78df40e883d7cf5250868
Author: Björn Fromme <*****@bjo3rn.com>
Date:   Thu Jul 4 15:08:45 2013 +0200

    [TASK] Incorrect exception message

commit 134cd5e29864478bba78e94b98c45fbda1a9b47e
Author: Björn Fromme <*****@bjo3rn.com>
Date:   Thu Jul 4 15:11:37 2013 +0200

    [TASK] Reorder conditions according to CGL

commit f9faca970f0d537242651764bdf44734abafa187
Author: Björn Fromme <*****@bjo3rn.com>
Date:   Mon Dec 16 17:51:09 2013 +0100

    [TASK] Refactor class inheritance

commit da31bad1d9bb058c072ddb5591e8ed907a1ae8e1
Author: Claus Due <*****@namelesscoder.net>
Date:   Tue Dec 31 23:08:37 2013 +0100

    [TASK] Happy new year!

commit d2e531da034976e6db1478eef5a8478595fd16fe
Author: Claus Due <*****@namelesscoder.net>
Date:   Sun Jan 5 00:45:10 2014 +0100

    [TASK] Migrate to using namespace core class names

commit b09a8f61b50b469f2e8dcde241a0ace4817e0a61
Author: Claus Due <*****@namelesscoder.net>
Date:   Mon Apr 14 01:49:47 2014 +0200

    [TASK] Replace an Exception with a ViewHelperException

commit 52bd6e41ccfef3d8193b350153912a9716e6a087
Author: Benjamin Rau <*****@codearts.at>
Date:   Tue Apr 1 21:09:00 2014 +0200

    [TASK] CGL compliance

commit da7677bc74f14e9a9300e4ba4487e52c3cb97642
Author: Claus Due <*****@namelesscoder.net>
Date:   Sun Apr 20 01:13:33 2014 +0200

    [TASK] Switch to namespaces

commit 4981055359c895f3869e5bd878293b3c15ed26e5
Author: Xaver Maierhofer <*****@xwissen.info>
Date:   Sun Jan 18 14:01:04 2015 +0100

    [TASK] CGL - Define classes, params, use imports

commit 8bb2fc5ee124ba19b0a0ab8e061c9a153fc4651f
Author: Xaver Maierhofer <*****@xwissen.info>
Date:   Sun Jan 18 17:56:13 2015 +0100

    [TASK] Reference Copyright to license.md file