28
i want to access the value of a object inside a twig template.
Normally i would get the return like that:
echo $lang->get("test");
But how can i do the same in the template with twig?
I tried so many methods but no one worked.
For example i tried:
{{ attribute(lang, get, 'test') }}
with the result
Catchable fatal error: Argument 3 passed to Twig_Node_Expression_GetAttr::__construct() must be an instance of Twig_Node_Expression_Array, instance of Twig_Node_Expression_Constant given
thanks