SiteInterface
Table of Contents
Methods
- getAvailableLanguages() : array<string|int, SiteLanguage>
- Fetch the available languages for a specific backend user, used in various places in Backend and Frontend when a Backend User is authenticated.
- getBase() : UriInterface
- Returns the base URL
- getDefaultLanguage() : SiteLanguage
- Returns the first language that was configured. This is usually language=0
- getErrorHandler() : PageErrorHandlerInterface
- Returns a ready-to-use error handler, to be used within the ErrorController
- getIdentifier() : string
- Returns an identifier for the site / configuration
- getLanguageById() : SiteLanguage
- Returns a language of this site, given by the sys_language_uid
- getLanguages() : array<string|int, SiteLanguage>
- Returns all available languages of this site visible in the frontend
- getRootPageId() : int
- Returns the root page ID of this site
Methods
getAvailableLanguages()
Fetch the available languages for a specific backend user, used in various places in Backend and Frontend when a Backend User is authenticated.
public
getAvailableLanguages(BackendUserAuthentication $user[, bool $includeAllLanguagesFlag = false ][, int|null $pageId = null ]) : array<string|int, SiteLanguage>
Parameters
- $user : BackendUserAuthentication
-
the authenticated backend user to check access rights
- $includeAllLanguagesFlag : bool = false
-
whether "-1" should be included in the values or not.
- $pageId : int|null = null
-
usually used for resolving additional information from PageTS, only used for pseudo-sites. uid of the default language row!
Return values
array<string|int, SiteLanguage>getBase()
Returns the base URL
public
getBase() : UriInterface
Return values
UriInterfacegetDefaultLanguage()
Returns the first language that was configured. This is usually language=0
public
getDefaultLanguage() : SiteLanguage
Return values
SiteLanguagegetErrorHandler()
Returns a ready-to-use error handler, to be used within the ErrorController
public
getErrorHandler(int $statusCode) : PageErrorHandlerInterface
Parameters
- $statusCode : int
Tags
Return values
PageErrorHandlerInterfacegetIdentifier()
Returns an identifier for the site / configuration
public
getIdentifier() : string
Return values
stringgetLanguageById()
Returns a language of this site, given by the sys_language_uid
public
getLanguageById(int $languageId) : SiteLanguage
Parameters
- $languageId : int
Tags
Return values
SiteLanguagegetLanguages()
Returns all available languages of this site visible in the frontend
public
getLanguages() : array<string|int, SiteLanguage>
Return values
array<string|int, SiteLanguage>getRootPageId()
Returns the root page ID of this site
public
getRootPageId() : int