SiteFinder
Is used in backend and frontend for all places where to read / identify sites and site languages.
Table of Contents
Properties
- $mappingRootPageIdToIdentifier : array<string|int, mixed>
- Short-hand to quickly fetch a site based on a rootPageId
- $siteConfiguration : SiteConfiguration
- $sites : array<string|int, Site>
Methods
- __construct() : mixed
- Fetches all existing configurations as Site objects
- getAllSites() : array<string|int, Site>
- Return a list of all configured sites
- getSiteByIdentifier() : Site
- Find a site by given identifier
- getSiteByPageId() : Site
- Traverses the rootline of a page up until a Site was found.
- getSiteByRootPageId() : Site
- Find a site by given root page id
- fetchAllSites() : void
Properties
$mappingRootPageIdToIdentifier
Short-hand to quickly fetch a site based on a rootPageId
protected
array<string|int, mixed>
$mappingRootPageIdToIdentifier
= []
$siteConfiguration
protected
SiteConfiguration
$siteConfiguration
$sites
protected
array<string|int, Site>
$sites
= []
Methods
__construct()
Fetches all existing configurations as Site objects
public
__construct([SiteConfiguration|null $siteConfiguration = null ]) : mixed
Parameters
- $siteConfiguration : SiteConfiguration|null = null
getAllSites()
Return a list of all configured sites
public
getAllSites([bool $useCache = true ]) : array<string|int, Site>
Parameters
- $useCache : bool = true
Return values
array<string|int, Site>getSiteByIdentifier()
Find a site by given identifier
public
getSiteByIdentifier(string $identifier) : Site
Parameters
- $identifier : string
Tags
Return values
SitegetSiteByPageId()
Traverses the rootline of a page up until a Site was found.
public
getSiteByPageId(int $pageId[, array<string|int, mixed>|null $rootLine = null ][, string|null $mountPointParameter = null ]) : Site
Parameters
- $pageId : int
- $rootLine : array<string|int, mixed>|null = null
- $mountPointParameter : string|null = null
Tags
Return values
SitegetSiteByRootPageId()
Find a site by given root page id
public
getSiteByRootPageId(int $rootPageId) : Site
Parameters
- $rootPageId : int
-
the page ID (default language)
only for usage in some places for managing Site Configuration, might be removed without further notice
Tags
Return values
SitefetchAllSites()
protected
fetchAllSites([bool $useCache = true ]) : void
Parameters
- $useCache : bool = true