Skip to content
Advertisement

Tag: template-engine

How to retrieve all Variables from a Twig Template?

Is it possible to retrieve all variables inside a Twig template with PHP? Example someTemplate.twig.php: Now I want to do something like this: $variables should now contain “name” and “email”. The reason I want to do this is that I am working on a CMS system where my twig templates and variables are dynamically set by my users and they

Advertisement