Symfony\Bundle\FrameworkBundle\Templating\GlobalVariables
GlobalVariables is the entry point for Symfony global variables in Twig templates.
- Author: Fabien Potencier <fabien@symfony.com>
Synopsis
class GlobalVariables
{
- // members
- protected $container;
- // methods
- public void __construct()
- public SecurityContext|null getSecurity()
- public mixed|void getUser()
- public Request|null getRequest()
- public Session|null getSession()
- public string getEnvironment()
- public Boolean getDebug()
Members
protected
- $container
Methods
public
- __construct()
- getDebug() — Returns the current app debug mode.
- getEnvironment() — Returns the current app environment.
- getRequest() — Returns the current request.
- getSecurity() — Returns the security context service.
- getSession() — Returns the current session.
- getUser() — Returns the current user.