Closed polo195pl closed 4 years ago
Variables is auto passing. You can check in twig via {{ dump() }}
Curious - was the documentation on this unclear?
Its not unclear, but for me it looks like a workaround if i need to pass a controller variable to the template.
now i have to inject the twig environment in my controller action and call
$twig->addGlobal('name', $variable );
It would be nice to just have
$table->add(
'name',
TwigColumn::class,
['variables' => ['name' => $variable],
...
or something like that
How can i pass variable into TwigColumn?