call

Call ViewHelper

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

Examples

<!-- 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'}" />

Arguments

object

DataType
mixed
Required
false
Description
Instance to call method on

method

DataType
string
Required
false
Description
Name of method to call on instance

arguments

DataType
mixed
Default
array ()
Required
false
Description
Array of arguments if method requires arguments