Documentation · ViewHelper reference

XSD schema file | vhs master

Iterator / PopViewHelper

Pops the last value off $subject (but does not change $subject itself as array_pop would). /

  • Tag usage example

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

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

Arguments

Argument Description Type
as

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

string
subject

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

mixed
Required attribute

Revision history

commit 8600c97d970fcf4290fd8401f4f43bc66bab2403
Author: Claus Due <*****@wildside.dk>
Date:   Wed Jan 2 19:01:05 2013 +0100

    [FEATURE] Iterator / Pop and Iterator / Shift ViewHelpers

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

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

commit ed15bec7ec1450244979567f31ea9e8b7c3bc374
Author: Claus Due <*****@namelesscoder.net>
Date:   Wed Nov 6 03:21:04 2013 +0100

    [FEATURE] ViewHelperUtility for reusable methods

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 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 65ef3ba07a5f0cb9b26ccbfbfc205a4e8d145577
Author: Claus Due <*****@namelesscoder.net>
Date:   Sat Oct 11 14:58:45 2014 +0200

    [TASK] Refactor and cover Iterator / Merge, Pop, Random, Shift

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

    [TASK] Reference Copyright to license.md file