‪TYPO3CMS  ‪main
TYPO3\CMS\Core\Routing\Aspect\SiteAccessorTrait Class Reference

Public Member Functions

 setSite (Site $site)
 
 getSite ()
 

Protected Member Functions

 filterContainedInSite (array $results)
 
 isPageIdContainedInSite (int $pageId)
 
 getSiteMatcher ()
 

Protected Attributes

Site $site
 
SiteMatcher null $siteMatcher
 

Detailed Description

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.

Definition at line 30 of file SiteAccessorTrait.php.

Member Function Documentation

◆ filterContainedInSite()

TYPO3\CMS\Core\Routing\Aspect\SiteAccessorTrait::filterContainedInSite ( array  $results)
protected

Filters records that are contained in current site (resolved from current SiteLanguage).

Results keep original indexes and probably needs to be passed through array_values for e.g. using the first result by $results[0].

Parameters
array$results

Definition at line 60 of file SiteAccessorTrait.php.

References TYPO3\CMS\Core\Routing\Aspect\SiteAccessorTrait\isPageIdContainedInSite().

◆ getSite()

TYPO3\CMS\Core\Routing\Aspect\SiteAccessorTrait::getSite ( )

◆ getSiteMatcher()

TYPO3\CMS\Core\Routing\Aspect\SiteAccessorTrait::getSiteMatcher ( )
protected

◆ isPageIdContainedInSite()

TYPO3\CMS\Core\Routing\Aspect\SiteAccessorTrait::isPageIdContainedInSite ( int  $pageId)
protected

Determines whether page is contained in current site (resolved from current SiteLanguage).

Definition at line 80 of file SiteAccessorTrait.php.

References TYPO3\CMS\Core\Routing\Aspect\SiteAccessorTrait\getSiteMatcher().

Referenced by TYPO3\CMS\Core\Routing\Aspect\SiteAccessorTrait\filterContainedInSite().

◆ setSite()

TYPO3\CMS\Core\Routing\Aspect\SiteAccessorTrait::setSite ( Site  $site)

Member Data Documentation

◆ $site

Site TYPO3\CMS\Core\Routing\Aspect\SiteAccessorTrait::$site
protected

◆ $siteMatcher

SiteMatcher null TYPO3\CMS\Core\Routing\Aspect\SiteAccessorTrait::$siteMatcher
protected