public function addTwigFilter($name, callable $filter, array $options = [])
    {
        $twigFilter = new \Twig_SimpleFilter($name, $filter, $options);

        $this->twig->addFilter($twigFilter);
    }
public function addTwigFilter($name, callable $filter, array $options = [])
    {
        $twigFilter = new \Twig_SimpleFilter($name, $filter, $options);

        $this->twig->addFilter($twigFilter);
    }
public function addTwigFilter ( $ name , callable $ filter , array $ options = [ ] ) { $ twigFilter = new \ Twig_SimpleFilter ( $ name , $ filter , $ options ) ; $ this -> twig -> addFilter ( $ twigFilter ) ; }
Adds a new Twig filter.

@see http://twig.sensiolabs.org/doc/advanced.html#filters Twig documentation

@param string   $name    Name of filter
@param callable $filter  Filter implementation
@param array    $options
Adds a new Twig filter .