PHP Class Neos\Neos\Domain\Service\ContentContext

Inheritance: extends Neos\ContentRepository\Domain\Service\Context
Show file Open project: neos/neos-development-collection Class Usage Examples

Protected Properties

Property Type Description
$currentDomain Neos\Neos\Domain\Model\Domain
$currentSite Neos\Neos\Domain\Model\Site
$currentSiteNode Neos\ContentRepository\Domain\Model\NodeInterface
$interfaceRenderModeService UserInterfaceModeService
$privilegeManager Neos\Flow\Security\Authorization\PrivilegeManagerInterface

Public Methods

Method Description
__construct ( string $workspaceName, DateTimeInterface $currentDateTime, array $dimensions, array $targetDimensions, boolean $invisibleContentShown, boolean $removedContentShown, boolean $inaccessibleContentShown, Site $currentSite = null, Domain $currentDomain = null ) Creates a new Content Context object.
getCurrentDomain ( ) : Domain Returns the current domain from this frontend context
getCurrentRenderingMode ( ) : UserInterfaceMode
getCurrentSite ( ) : Site Returns the current site from this frontend context
getCurrentSiteNode ( ) : Neos\ContentRepository\Domain\Model\NodeInterface Returns the node of the current site.
getProperties ( ) : array Returns the properties of this context.
isInBackend ( ) : boolean Returns TRUE while rendering backend (not live workspace and access to backend granted), FALSE otherwise
isLive ( ) : boolean Returns TRUE if current context is live workspace, FALSE otherwise

Protected Methods

Method Description
hasAccessToBackend ( ) : boolean Is access to the neos backend granted by current authentications.

Method Details

__construct() public method

NOTE: This is for internal use only, you should use the ContextFactory for creating Context instances.
See also: ContextFactoryInterface
public __construct ( string $workspaceName, DateTimeInterface $currentDateTime, array $dimensions, array $targetDimensions, boolean $invisibleContentShown, boolean $removedContentShown, boolean $inaccessibleContentShown, Site $currentSite = null, Domain $currentDomain = null )
$workspaceName string Name of the current workspace
$currentDateTime DateTimeInterface The current date and time
$dimensions array Array of dimensions with array of ordered values
$targetDimensions array Array of dimensions used when creating / modifying content
$invisibleContentShown boolean If invisible content should be returned in query results
$removedContentShown boolean If removed content should be returned in query results
$inaccessibleContentShown boolean If inaccessible content should be returned in query results
$currentSite Neos\Neos\Domain\Model\Site The current Site object
$currentDomain Neos\Neos\Domain\Model\Domain The current Domain object

getCurrentDomain() public method

Returns the current domain from this frontend context
public getCurrentDomain ( ) : Domain
return Neos\Neos\Domain\Model\Domain The current domain

getCurrentRenderingMode() public method

public getCurrentRenderingMode ( ) : UserInterfaceMode
return Neos\Neos\Domain\Model\UserInterfaceMode

getCurrentSite() public method

Returns the current site from this frontend context
public getCurrentSite ( ) : Site
return Neos\Neos\Domain\Model\Site The current site

getCurrentSiteNode() public method

Returns the node of the current site.
public getCurrentSiteNode ( ) : Neos\ContentRepository\Domain\Model\NodeInterface
return Neos\ContentRepository\Domain\Model\NodeInterface

getProperties() public method

Returns the properties of this context.
public getProperties ( ) : array
return array

hasAccessToBackend() protected method

Is access to the neos backend granted by current authentications.
protected hasAccessToBackend ( ) : boolean
return boolean

isInBackend() public method

Returns TRUE while rendering backend (not live workspace and access to backend granted), FALSE otherwise
public isInBackend ( ) : boolean
return boolean

isLive() public method

Returns TRUE if current context is live workspace, FALSE otherwise
public isLive ( ) : boolean
return boolean

Property Details

$currentDomain protected property

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

$currentSite protected property

protected Site,Neos\Neos\Domain\Model $currentSite
return Neos\Neos\Domain\Model\Site

$currentSiteNode protected property

protected NodeInterface,Neos\ContentRepository\Domain\Model $currentSiteNode
return Neos\ContentRepository\Domain\Model\NodeInterface

$interfaceRenderModeService protected property

protected UserInterfaceModeService,Neos\Neos\Domain\Service $interfaceRenderModeService
return UserInterfaceModeService

$privilegeManager protected property

protected PrivilegeManagerInterface,Neos\Flow\Security\Authorization $privilegeManager
return Neos\Flow\Security\Authorization\PrivilegeManagerInterface