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"

findFirstOnline()

Find first site with status "online"

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 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