Hello,
I need to write
sprintf('%010s', $invoiceFlat->invoiceInc)
in volt. How to use format modifier?
Hey man
You must to defind function php in volt, for example
[...] $compiler = $volt->getCompiler(); $compiler->addFunction('sprintf', 'sprintf');
Also you refer setup function of volt here
Check this: https://github.com/phalcon/invo/blob/master/app/views/products/search.volt#L30
It worked! :) Thank you. Here is my example.
{{ ('%0'~society.invoicePad~'s')|format(invoiceFlat.invoiceInc) }}