SiteAccessorTrait
Helper trait to use a site within a class.
this is not public API yet as this might change, and could be changed within TYPO3 Core at any time.
Table of Contents
Properties
- $site : Site
- $siteMatcher : SiteMatcher|null
Methods
- getSite() : Site
- setSite() : void
- filterContainedInSite() : array<string|int, mixed>
- Filters records that are contained in current site (resolved from current SiteLanguage).
- getSiteMatcher() : SiteMatcher
- isPageIdContainedInSite() : bool
- Determines whether page is contained in current site (resolved from current SiteLanguage).
Properties
$site
protected
Site
$site
$siteMatcher
protected
SiteMatcher|null
$siteMatcher
Methods
getSite()
public
getSite() : Site
Return values
SitesetSite()
public
setSite(Site $site) : void
Parameters
- $site : Site
filterContainedInSite()
Filters records that are contained in current site (resolved from current SiteLanguage).
protected
filterContainedInSite(array<string|int, mixed> $results) : array<string|int, mixed>
Results keep original indexes and probably needs to
be passed through array_values
for e.g. using the
first result by $results[0]
.
Parameters
- $results : array<string|int, mixed>
Return values
array<string|int, mixed>getSiteMatcher()
protected
getSiteMatcher() : SiteMatcher
Return values
SiteMatcherisPageIdContainedInSite()
Determines whether page is contained in current site (resolved from current SiteLanguage).
protected
isPageIdContainedInSite(int $pageId) : bool
Parameters
- $pageId : int