Velocity template - foreach loop
Answered
Hi,
I'm trying to modify the default PHP constructor template to have a multiline constructor instead of a single line one.
I came up with this code which only displays one parameter and doesn't display the body of the constructor... It seems to stop at the #end instruction
Can somebody help ?
/**
* ${CLASS_NAME} constructor.
${PARAM_DOC}
${THROWS_DOC}
*/
public function __construct(
#foreach ($param in $PARAM_LIST.split(","))
$param
#end
) {
${BODY}
}
Please sign in to leave a comment.
Please try
Works great! Thanks!