Is it possible to use this php function directly in volt engine ?
$compiler = $volt->getCompiler(); $compiler->addFilter('round','round');
Hi, you can write own custom view helper https://docs.phalcon.io/en/latest/reference/tags.html#creating-your-own-helpers
example:
class Number extends \Phalcon\Tag { public function round($number, $precision = 0 $mode = PHP_ROUND_HALF_UP) { return round($number, $precision, $mode); } another methods }
and then in volt
{{ Number.round(100.256, 2) }}