Hi, I write my own view helper as below:
<?php
namespace Tartan;
class Tag extends \Phalcon\Tag
{
static public function gtoj($date)
{
[...]
return $response;
}
}
then I added my own tag service in DI in my application bootstrap:
$di->set('tag', function() {
return new \Tartan\Tag();
});
NOW, I can use my helper like below and it works perfectly
<?php echo $this->tag->gtoj('2014-03-03'); ?>
but I can`t use it in Volt like
{{ gtoj("2014-03-03") }}
and I got following error:
Phalcon\Mvc\View\Exception: Undefined function 'gtoj' in /home/aboozar/www/2013/blue/app/modules/Panel/views/merchant/index.phtml on line 17
other tag helpers like {{ link_to("products/search", "Search") }} works in the same file too.
any Idea?