Hello!
I'm trying to write a custom filter.
$volt
->getCompiler()
->addFilter(
'num2str',
function($resolvedArgs, $exprArgs){
$number = (int) $resolvedArgs;
return '"' . $number . '"';
}
);
call filter:
{{contract.repaymentPeriod|num2str}}
$resolvedArgs is in string with the value '18'. but my filter returns 0.
tell me how to convert the left argument to a number?