Documentation · ViewHelper reference

XSD schema file | vhs 2.1.4


Call ViewHelper

Calls a method on an existing object. Usable as inline or tag.


<!-- inline, useful as argument, for example in f:for -->
{object -> v:call(method: 'toArray')}
<!-- tag, useful to quickly output simple values -->
<v:call object="{object}" method="unconventionalGetter" />
<v:call method="unconventionalGetter">{object}</v:call>
<!-- arguments for the method -->
<v:call object="{object}" method="doSomethingWithArguments" arguments="{0: 'foo', 1: 'bar'}" />
  • Tag usage example

    <v:call method="NULL" object="[object]" arguments="{foo: 'bar'}">
    	<!-- tag content - may be ignored! -->
  • Inline usage example

    {v:call(method: 'NULL', object: [object], arguments: {foo: 'bar'})}


Argument Description Type
arguments array
method string
object object
Required attribute

Revision history

commit a0e5ae2a3d1326f13c635299e6af93938929e0f4
Author: Claus Due <*****>
Date:   Sun Dec 30 02:35:30 2012 +0100

    [FEATURE] Call ViewHelper
    Calls method on an existing object, optionally with arguments.

commit f0ddc03c231ba02621469c12c85c6cbe50734937
Author: Claus Due <*****>
Date:   Sun Dec 30 06:45:58 2012 +0100

    [TASK] Allow "object" to be passed as inline argument, Call ViewHelper

commit 0b0d58e31a7fe760acee5ec46b373596d225ecc1
Author: Claus Due <*****>
Date:   Wed Jan 2 14:02:58 2013 +0100

    [DOC] Use Markdown in Doc Comments (1)
    Work in progress to be committed in smaller chunks. All Doc Comments are being turned into Markdown syntax for automatic rendering in online documentation.

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

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

commit db3cd7ddbffc430b6a108159cfc70dbe141e5410
Author: Claus Due <*****>
Date:   Fri Sep 13 03:08:34 2013 +0200

    [TASK] Improve test suite

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

    [TASK] Happy new year!

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

    [TASK] Migrate to using namespace core class names

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

    [TASK] CGL compliance

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

    [TASK] Switch to namespaces

commit 12ff0ddfb8d36c51f2d3befde7ae812177c80d5d
Author: Xaver Maierhofer <*****>
Date:   Wed Jun 11 00:01:47 2014 +0200

    [TASK] CGL remove use leading backslash
    PHP Docs
    Note that for namespaced names (fully qualified namespace names containing namespace separator, such as Foo\Bar as opposed to global names that do not, such as FooBar),
    the leading backslash is unnecessary and not recommended, as import names must be fully qualified, and are not processed relative to the current namespace.

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

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

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

    [TASK] Reference Copyright to file