symfony - filters in twig call -
how call function function filter filter? eg
public function getfilters()      {           return array (              'test' => new \ twig_filter_method ($this, 'test'),              'test1' => new \ twig_filter_method ($this, 'test1', array('is_safe' => array('html')))          );      }   public function test($test) {     return; }   public function test1($test) {     // how test call? } thanks , sorry english
from twig template can this:
{{ 'some string'|test|test1('argument')}} inside twig extension class can call test function regular php object function:
public function test1($test) {     // code     $testresult = $this->test($test); } 
Comments
Post a Comment