class SiteRepository extends Repository (View source)

The Site Repository

Properties

protected array $defaultOrderings
protected string $defaultSiteNodeName

Methods

findFirst()

Finds the first site

QueryResultInterface
findOnline()

Find all sites with status "online"

Site
findFirstOnline()

Find first site with status "online"

Site|null
findOneByNodeName(string $nodeName)

No description

findDefault()

Find the site that was specified in the configuration defaultSiteNodeName

Details

Site findFirst()

Finds the first site

Return Value

Site

The first site or NULL if none exists

QueryResultInterface findOnline()

Find all sites with status "online"

Return Value

QueryResultInterface

Site findFirstOnline()

Find first site with status "online"

Return Value

Site

Site|null findOneByNodeName(string $nodeName)

No description

Parameters

string $nodeName

Return Value

Site|null

Site findDefault()

Find the site that was specified in the configuration defaultSiteNodeName

If the defaultSiteNodeName-setting is null the first active site is returned If the site is not found or not active an exception is thrown

Return Value

Site

Exceptions

Exception