#68717TypoScript: Add general PHP function call to stdWrap
Description
TypoScript examples
Simple:
http://php.net/manual/en/function.ucwords.php
page.10 = TEXT
page.10.value = hello world
page.10.phpFunction = ucwords
More parameters:
http://php.net/manual/en/function.sprintf.php
page.10 = TEXT
page.10.value = There are %d monkeys in the %s
page.10.phpFunction = sprintf
page.10.phpFunction.parameters.1 = 5
page.10.phpFunction.parameters.2 = tree
The parameters are of type string/stdWrap.
This means by default the incoming content is parameter 0. This is the same as:
page.10 = TEXT
page.10.phpFunction = sprintf
page.10.phpFunction.parameters.0 = There are %d monkeys in the %s
page.10.phpFunction.parameters.1 = 5
page.10.phpFunction.parameters.2 = tree
How do we access the incoming content in parameter 2?
http://php.net/manual/en/function.str-replace.php
page.10 = TEXT
page.10.value =
page.10.phpFunction = str_replace
page.10.phpFunction.parameters.0 = %body%
page.10.phpFunction.parameters.1 = black
page.10.phpFunction.parameters.2 ???
If possible by the stdWrap of the parameter. Any suggestions?
Details:
The return parameter is always casted to string for the beginning, even if array or object. Future versions may offer a more skilled treatment of the return parameter by a property named return.
Personal motivation:
I want to learn the contribution workflow.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.