Let's say I create a function in a module file:
function _get_test() {
return 'test';
}
How can I call this in any Twig file? For example *.html.twig
, page.html.twig
, node.html.twig
etc.
OR
How can I pass a variable from PHP to Twig and display in any Twig file.
For example *.html.twig
, page.html.twig
, node.html.twig
etc.