PHP Class Neos\Neos\Domain\Model\Site

Show file Open project: neos/neos-development-collection Class Usage Examples

Protected Properties

Property Type Description
$assetCollection Neos\Media\Domain\Model\AssetCollection
$domains Collection
$name string Name of the site
$nodeName string The first level of nodes of a site can be reached via a path like "/Sites/MySite/" where "MySite" is the nodeName.
$primaryDomain Domain
$siteResourcesPackageKey string
$state integer The site's state

Public Methods

Method Description
__construct ( string $nodeName ) Constructs this Site object
__toString ( ) : string
emitSiteChanged ( ) : void Internal signal
getActiveDomains ( ) : Collection
getAssetCollection ( ) : AssetCollection
getDomains ( ) : Collection
getFirstActiveDomain ( ) : Domain | null
getName ( ) : string Returns the name of this site
getNodeName ( ) : string Returns the node name of this site
getPrimaryDomain ( ) : Domain Returns the primary domain, if one has been defined.
getSiteResourcesPackageKey ( ) : string Returns the key of a package containing the static resources for this site.
getState ( ) : integer Returns the state of this site
hasActiveDomains ( ) : boolean
isOffline ( ) : boolean
isOnline ( ) : boolean
onPostFlush ( ) : void Internal event handler to forward site changes to the "siteChanged" signal
setAssetCollection ( AssetCollection $assetCollection = null ) : void
setDomains ( Collection $domains ) : void
setName ( string $name ) : void Sets the name for this site
setNodeName ( string $nodeName ) : void Sets the node name for this site
setPrimaryDomain ( Domain $domain = null ) : void Sets (and adds if necessary) the primary domain of this site.
setSiteResourcesPackageKey ( string $packageKey ) : void Sets the key of a package containing the static resources for this site.
setState ( integer $state ) : void Sets the state for this site

Method Details

__construct() public method

Constructs this Site object
public __construct ( string $nodeName )
$nodeName string Node name of this site in the content repository

__toString() public method

public __toString ( ) : string
return string

emitSiteChanged() public method

Internal signal
public emitSiteChanged ( ) : void
return void

getActiveDomains() public method

public getActiveDomains ( ) : Collection
return Collection

getAssetCollection() public method

public getAssetCollection ( ) : AssetCollection
return Neos\Media\Domain\Model\AssetCollection

getDomains() public method

public getDomains ( ) : Collection
return Collection

getFirstActiveDomain() public method

public getFirstActiveDomain ( ) : Domain | null
return Domain | null

getName() public method

Returns the name of this site
public getName ( ) : string
return string The name

getNodeName() public method

If you need to fetch the root node for this site, use the content context, do not use the NodeDataRepository!
public getNodeName ( ) : string
return string The node name

getPrimaryDomain() public method

Returns the primary domain, if one has been defined.
public getPrimaryDomain ( ) : Domain
return Domain The primary domain or NULL

getSiteResourcesPackageKey() public method

Returns the key of a package containing the static resources for this site.
public getSiteResourcesPackageKey ( ) : string
return string The package key

getState() public method

Returns the state of this site
public getState ( ) : integer
return integer The state - one of the STATUS_* constant's values

hasActiveDomains() public method

public hasActiveDomains ( ) : boolean
return boolean TRUE if the site has at least one active domain assigned

isOffline() public method

public isOffline ( ) : boolean
return boolean

isOnline() public method

public isOnline ( ) : boolean
return boolean

onPostFlush() public method

Internal event handler to forward site changes to the "siteChanged" signal
public onPostFlush ( ) : void
return void

setAssetCollection() public method

public setAssetCollection ( AssetCollection $assetCollection = null ) : void
$assetCollection Neos\Media\Domain\Model\AssetCollection
return void

setDomains() public method

public setDomains ( Collection $domains ) : void
$domains Collection
return void

setName() public method

Sets the name for this site
public setName ( string $name ) : void
$name string The site name
return void

setNodeName() public method

Sets the node name for this site
public setNodeName ( string $nodeName ) : void
$nodeName string The site node name
return void

setPrimaryDomain() public method

Sets (and adds if necessary) the primary domain of this site.
public setPrimaryDomain ( Domain $domain = null ) : void
$domain Domain The domain
return void

setSiteResourcesPackageKey() public method

Sets the key of a package containing the static resources for this site.
public setSiteResourcesPackageKey ( string $packageKey ) : void
$packageKey string The package key
return void

setState() public method

Sets the state for this site
public setState ( integer $state ) : void
$state integer The site's state, must be one of the STATUS_* constants
return void

Property Details

$assetCollection protected property

protected AssetCollection,Neos\Media\Domain\Model $assetCollection
return Neos\Media\Domain\Model\AssetCollection

$domains protected property

protected Collection $domains
return Collection

$name protected property

Name of the site
protected string $name
return string

$nodeName protected property

The first level of nodes of a site can be reached via a path like "/Sites/MySite/" where "MySite" is the nodeName.
protected string $nodeName
return string

$primaryDomain protected property

protected Domain,Neos\Neos\Domain\Model $primaryDomain
return Domain

$siteResourcesPackageKey protected property

protected string $siteResourcesPackageKey
return string

$state protected property

The site's state
protected int $state
return integer