class Site (View source)

Domain model of a site

Constants

STATE_ONLINE

Site states

STATE_OFFLINE

Properties

protected string $name

Name of the site

protected string $nodeName

Node name of this site in the content repository.

protected Domain> $domains
protected Domain $primaryDomain
protected int $state

The site's state

protected string $siteResourcesPackageKey
protected AssetCollection $assetCollection

Methods

__construct(string $nodeName)

Constructs this Site object

string
__toString()

No description

void
setName(string $name)

Sets the name for this site

string
getName()

Returns the name of this site

string
getNodeName()

Returns the node name of this site

void
setNodeName(string $nodeName)

Sets the node name for this site

void
setState(int $state)

Sets the state for this site

int
getState()

Returns the state of this site

void
setSiteResourcesPackageKey(string $packageKey)

Sets the key of a package containing the static resources for this site.

string
getSiteResourcesPackageKey()

Returns the key of a package containing the static resources for this site.

bool
isOnline()

No description

bool
isOffline()

No description

void
setDomains(Domain> $domains)

No description

Domain>
getDomains()

No description

bool
hasActiveDomains()

No description

Domain>
getActiveDomains()

No description

Domain|null
getFirstActiveDomain()

No description

void
setPrimaryDomain(Domain $domain = null)

Sets (and adds if necessary) the primary domain of this site.

getPrimaryDomain()

Returns the primary domain, if one has been defined.

void
setAssetCollection(AssetCollection $assetCollection = null)

No description

void
onPostFlush()

Internal event handler to forward site changes to the "siteChanged" signal

void
emitSiteChanged()

Internal signal

Details

__construct(string $nodeName)

Constructs this Site object

Parameters

string $nodeName

Node name of this site in the content repository

string __toString()

No description

Return Value

string

void setName(string $name)

Sets the name for this site

Parameters

string $name

The site name

Return Value

void

string getName()

Returns the name of this site

Return Value

string

The name

string getNodeName()

Returns the node name of this site

If you need to fetch the root node for this site, use the content context, do not use the NodeDataRepository!

Return Value

string

The node name

void setNodeName(string $nodeName)

Sets the node name for this site

Parameters

string $nodeName

The site node name

Return Value

void

void setState(int $state)

Sets the state for this site

Parameters

int $state

The site's state, must be one of the STATUS_* constants

Return Value

void

int getState()

Returns the state of this site

Return Value

int

The state - one of the STATUS_* constant's values

void setSiteResourcesPackageKey(string $packageKey)

Sets the key of a package containing the static resources for this site.

Parameters

string $packageKey

The package key

Return Value

void

string getSiteResourcesPackageKey()

Returns the key of a package containing the static resources for this site.

Return Value

string

The package key

bool isOnline()

No description

Return Value

bool

bool isOffline()

No description

Return Value

bool

void setDomains(Domain> $domains)

No description

Parameters

Domain> $domains

Return Value

void

Domain> getDomains()

No description

Return Value

Domain>

bool hasActiveDomains()

No description

Return Value

bool

true if the site has at least one active domain assigned

Domain> getActiveDomains()

No description

Return Value

Domain>

Domain|null getFirstActiveDomain()

No description

Return Value

Domain|null

void setPrimaryDomain(Domain $domain = null)

Sets (and adds if necessary) the primary domain of this site.

Parameters

Domain $domain

The domain

Return Value

void

Domain getPrimaryDomain()

Returns the primary domain, if one has been defined.

Return Value

Domain

The primary domain or NULL

AssetCollection getAssetCollection()

No description

Return Value

AssetCollection

void setAssetCollection(AssetCollection $assetCollection = null)

No description

Parameters

AssetCollection $assetCollection

Return Value

void

void onPostFlush()

Internal event handler to forward site changes to the "siteChanged" signal

Return Value

void

void emitSiteChanged()

Internal signal

Return Value

void