PHP Class Neos\Neos\Domain\Service\ContentContextFactory

See \Neos\ContentRepository\Domain\Service\ContextFactory->build for detailed explanations about the usage.
Inheritance: extends Neos\ContentRepository\Domain\Service\ContextFactory
显示文件 Open project: neos/neos-development-collection Class Usage Examples

Protected Properties

Property Type Description
$contextImplementation string The context implementation this factory will create
$domainRepository Neos\Neos\Domain\Repository\DomainRepository
$siteRepository Neos\Neos\Domain\Repository\SiteRepository

Protected Methods

Method Description
buildContextInstance ( array $contextProperties ) : ContentContext Creates the actual Context instance.
getIdentifierSource ( array $contextProperties ) : string This creates the actual identifier and needs to be overridden by builders extending this.
mergeContextPropertiesWithDefaults ( array $contextProperties ) : array Merges the given context properties with sane defaults for the context implementation.
setDefaultSiteAndDomainFromCurrentRequest ( array $defaultContextProperties ) : array Determines the current domain and site from the request and sets the resulting values as as defaults.
validateContextProperties ( array $contextProperties ) : void

Method Details

buildContextInstance() protected method

This needs to be overridden if the Builder is extended.
protected buildContextInstance ( array $contextProperties ) : ContentContext
$contextProperties array
return ContentContext

getIdentifierSource() protected method

This creates the actual identifier and needs to be overridden by builders extending this.
protected getIdentifierSource ( array $contextProperties ) : string
$contextProperties array
return string

mergeContextPropertiesWithDefaults() protected method

Merges the given context properties with sane defaults for the context implementation.
protected mergeContextPropertiesWithDefaults ( array $contextProperties ) : array
$contextProperties array
return array

setDefaultSiteAndDomainFromCurrentRequest() protected method

Determines the current domain and site from the request and sets the resulting values as as defaults.
protected setDefaultSiteAndDomainFromCurrentRequest ( array $defaultContextProperties ) : array
$defaultContextProperties array
return array

validateContextProperties() protected method

protected validateContextProperties ( array $contextProperties ) : void
$contextProperties array
return void

Property Details

$contextImplementation protected_oe property

The context implementation this factory will create
protected string $contextImplementation
return string

$domainRepository protected_oe property

protected DomainRepository,Neos\Neos\Domain\Repository $domainRepository
return Neos\Neos\Domain\Repository\DomainRepository

$siteRepository protected_oe property

protected SiteRepository,Neos\Neos\Domain\Repository $siteRepository
return Neos\Neos\Domain\Repository\SiteRepository