class AppGlobal

A twig global that provides information about the app

Methods

__construct(Controller $controller, ContainerInterface $container)

Create new AppGlobal

getController()

Get the controller handling the request

string
getEnvironment()

Get the environment of the kernel

bool
isDebug()

Find out whether the kernel has enabled debugging

bool
isMaintenance()

Find out whether maintenance mode is enabled for users of the website

string
getSiteTitle()

Get the name of the website

string
getSiteWelcome()

Get the name of the website

string
getSiteSlug()

Get the name of the website

bool
isAlertEnabled()

Whether or not the website wide alert is enabled

bool
isAlertCollapsible()

Should the alert be collapsible

string
getAlertHeader()

The title of the alert

string
getAlertMessage()

The message of the alert

string
getUrlType()

The type of URLs for Models

string
getAlertID()

A unique enough identifier of the alert

array
getSocket()

Get information about sockets

Page[]
getPages()

Get a list of visible pages

Details

at line line 30
__construct(Controller $controller, ContainerInterface $container)

Create new AppGlobal

Parameters

Controller $controller The controller handling the request
ContainerInterface $container Symfony's service container

at line line 41
Controller getController()

Get the controller handling the request

Return Value

Controller

at line line 51
string getEnvironment()

Get the environment of the kernel

Return Value

string

at line line 61
bool isDebug()

Find out whether the kernel has enabled debugging

Return Value

bool

at line line 71
bool isMaintenance()

Find out whether maintenance mode is enabled for users of the website

Return Value

bool

at line line 81
string getSiteTitle()

Get the name of the website

Return Value

string

at line line 91
string getSiteWelcome()

Get the name of the website

Return Value

string

at line line 101
string getSiteSlug()

Get the name of the website

Return Value

string

at line line 111
bool isAlertEnabled()

Whether or not the website wide alert is enabled

Return Value

bool

at line line 121
bool isAlertCollapsible()

Should the alert be collapsible

Return Value

bool

at line line 131
string getAlertHeader()

The title of the alert

Return Value

string

at line line 141
string getAlertMessage()

The message of the alert

Return Value

string

at line line 151
string getUrlType()

The type of URLs for Models

Return Value

string vanity or permalink

at line line 161
string getAlertID()

A unique enough identifier of the alert

Return Value

string

at line line 171
array getSocket()

Get information about sockets

Return Value

array

at line line 186
Page[] getPages()

Get a list of visible pages

Return Value

Page[]