Edit on GitHub
Jump to docs navigation

Twig Components / Methods / app

Note: You are currently reading the documentation for Bolt 5.0. Looking for the documentation for Bolt 5.2 instead?

app = object(Symfony\Bridge\Twig\AppVariable) is a Twig global. It contains:

Name Description
debug Boolean indicating whether Debug is enabled or not
environment Indicating the current environment, like dev or prod
request Instance of Symfony\Component\HttpFoundation\Request
session Instance of Symfony\Component\HttpFoundation\Session\Session
flashes Array of Session Flashes
user Instance of Bolt\Entity\User
tokenStorage Instance of Symfony's UsageTrackingTokenStorage
requestStack Instance of Symfony\Component\HttpFoundation\RequestStack
{{ app.debug }}

Source: Bolt



Edit this page on GitHub
Couldn't find what you were looking for? We are happy to help you in the forum, on Slack or on Github.