can any one suggest how to access class static property from the twig template ?
Lets say i have
class Foo {
const KEY_1 = 1;
const KEY_2 = 2;
const VAL_1 = 'HELLO 1';
const VAL_2 = 'HELLO 2';
public static $bar = array(
self::KEY_1 => self::VAL_1,
self::KEY_2 => self::VAL_2,
);
}
then i transfer this class to the template like
$template->render(array('Foo' => new Foo() ))
now, how i can access the static property from the twig template like
{{ Foo.bar.constant('Foo::KEY_1') }}
smth like this or any other way ... it looks to me that i tried all possible ways :(