System\Classes\SiteManager\HasSiteContext


Protected Properties

protected bool $globalContext

globalContext disables site filters globally.

protected SiteDefinition|null $siteContext

siteContext overrides the current site context.


Public Methods

public getSiteCodeFromContext()

public getSiteCodeFromContext(): string|null 

public getSiteFromContext()

public getSiteFromContext(): SiteDefinition 

public getSiteIdFromContext()

public getSiteIdFromContext(): int|null 

public hasGlobalContext()

public hasGlobalContext(): bool 

public listSiteIdsInContext()

public listSiteIdsInContext(): void

public listSiteIdsInGroup()

public listSiteIdsInGroup($siteId = null): void

public listSiteIdsInLocale()

public listSiteIdsInLocale($siteId = null): void

public withContext()

public withContext($siteId, $callback): void

public withGlobalContext()

public withGlobalContext($callback): void