wanted to know if it's possible to run a class method from inside twig
lets say i have a class name model
and there is model.generateHtml() which just returns a string of html rep
in controller:
- Code: Select all
return $this->render('Bundle:Result:result.html.twig', array('model' => $model));
in result.html.twig:
- Code: Select all
{{model.generateHtml()}}
tried both with parenthesis and without but nothing is working
any suggestions?
thanks
Roy
