Hi All, So im using twig views in my project and I have set a global,
$twig->getEnvironment()->addGlobal('details', []);
So Now i have a global middleware that wants to check if this details is not an empty array and if so do a DB query and fill the array with details.
the $twig->getEnvironment()->addGlobal() method just addeds it and I only want to set this globle once so every page can use this info…
Theres a getGlobals() method on the environment but its been marked for internal use… how do i access the globals check if its still an empty array and is so do the DB query only ones