NullSite implements SiteInterface
Entity representing a site for everything on "pid=0". Mostly used in TYPO3 Backend, not really in use elsewhere.
Table of Contents
Interfaces
Properties
- $languages : array<string|int, SiteLanguage>
- $rootPageId : int
Methods
- __construct() : mixed
- Sets up a null site object
- getAvailableLanguages() : array<string|int, SiteLanguage>
- This takes page TSconfig into account (unlike Site interface) to find mod.SHARED.disableLanguages and mod.SHARED.defaultLanguageLabel
- getBase() : UriInterface
- Always "/"
- 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 always #NULL
- 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 installation
- getRootPageId() : int
- Always zero
- getLanguageService() : LanguageService
Properties
$languages
protected
array<string|int, SiteLanguage>
$languages
$rootPageId
protected
int
$rootPageId
= 0
Methods
__construct()
Sets up a null site object
public
__construct([array<string|int, mixed>|null $languages = null ][, Uri|null $baseEntryPoint = null ]) : mixed
Parameters
- $languages : array<string|int, mixed>|null = null
-
site languages
- $baseEntryPoint : Uri|null = null
getAvailableLanguages()
This takes page TSconfig into account (unlike Site interface) to find mod.SHARED.disableLanguages and mod.SHARED.defaultLanguageLabel
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()
Always "/"
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 always #NULL
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 installation
public
getLanguages() : array<string|int, SiteLanguage>
Return values
array<string|int, SiteLanguage>getRootPageId()
Always zero
public
getRootPageId() : int
Return values
intgetLanguageService()
protected
getLanguageService() : LanguageService