PHP 클래스 Neos\ContentRepository\Domain\Service\ContextFactory

Refer to 'ContextFactoryInterface' instead of 'ContextFactory' when injecting this factory into your own class.
상속: implements Neos\ContentRepository\Domain\Service\ContextFactoryInterface
파일 보기 프로젝트 열기: neos/neos-development-collection 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$contentDimensionRepository Neos\ContentRepository\Domain\Repository\ContentDimensionRepository
$contextImplementation string The context implementation this factory will create
$contextInstances array
$now Neos\Flow\Utility\Now
$securityContext Neos\Flow\Security\Context

공개 메소드들

메소드 설명
create ( array $contextProperties = [] ) : Context Create the context from the given properties. If a context with those properties was already created before then the existing one is returned.
getInstances ( ) : array Returns all known instances of Context.
reset ( ) Reset instances (internal)

보호된 메소드들

메소드 설명
buildContextInstance ( array $contextProperties ) : Context Creates the actual Context instance.
getAvailableDimensions ( ) : array<\Neos\ContentRepository\Domain\Model\ContentDimension>
getIdentifier ( array $contextProperties ) : string Provides a way to identify a context to prevent duplicate context objects.
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.
mergeDimensionValues ( array $contextProperties, array &$mergedProperties ) : void
mergeTargetDimensionContextProperties ( array $contextProperties, array &$mergedProperties, array $defaultContextProperties ) : mixed
removeDeprecatedProperties ( array $contextProperties ) : array Removes context properties which have been previously allowed but are not supported anymore and should be silently ignored
validateContextProperties ( array $contextProperties ) : void

메소드 상세

buildContextInstance() 보호된 메소드

This needs to be overridden if the Builder is extended.
protected buildContextInstance ( array $contextProperties ) : Context
$contextProperties array
리턴 Context

create() 공개 메소드

The context properties to give depend on the implementation of the context object, for the Neos\ContentRepository\Domain\Service\Context it should look like this: array( 'workspaceName' => 'live', 'currentDateTime' => new \Neos\Flow\Utility\Now(), 'dimensions' => array(...), 'targetDimensions' => array('language' => 'de', 'persona' => 'Lisa'), 'invisibleContentShown' => FALSE, 'removedContentShown' => FALSE, 'inaccessibleContentShown' => FALSE ) This array also shows the defaults that get used if you don't provide a certain property.
public create ( array $contextProperties = [] ) : Context
$contextProperties array
리턴 Context

getAvailableDimensions() 보호된 메소드

protected getAvailableDimensions ( ) : array<\Neos\ContentRepository\Domain\Model\ContentDimension>
리턴 array<\Neos\ContentRepository\Domain\Model\ContentDimension>

getIdentifier() 보호된 메소드

Provides a way to identify a context to prevent duplicate context objects.
protected getIdentifier ( array $contextProperties ) : string
$contextProperties array
리턴 string

getIdentifierSource() 보호된 메소드

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

getInstances() 공개 메소드

Returns all known instances of Context.
public getInstances ( ) : array
리턴 array

mergeContextPropertiesWithDefaults() 보호된 메소드

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

mergeDimensionValues() 보호된 메소드

protected mergeDimensionValues ( array $contextProperties, array &$mergedProperties ) : void
$contextProperties array
$mergedProperties array
리턴 void

mergeTargetDimensionContextProperties() 보호된 메소드

protected mergeTargetDimensionContextProperties ( array $contextProperties, array &$mergedProperties, array $defaultContextProperties ) : mixed
$contextProperties array
$mergedProperties array
$defaultContextProperties array
리턴 mixed

removeDeprecatedProperties() 보호된 메소드

Removes context properties which have been previously allowed but are not supported anymore and should be silently ignored
protected removeDeprecatedProperties ( array $contextProperties ) : array
$contextProperties array
리턴 array

reset() 공개 메소드

Reset instances (internal)
public reset ( )

validateContextProperties() 보호된 메소드

protected validateContextProperties ( array $contextProperties ) : void
$contextProperties array
리턴 void

프로퍼티 상세

$contentDimensionRepository 보호되어 있는 프로퍼티

protected ContentDimensionRepository,Neos\ContentRepository\Domain\Repository $contentDimensionRepository
리턴 Neos\ContentRepository\Domain\Repository\ContentDimensionRepository

$contextImplementation 보호되어 있는 프로퍼티

The context implementation this factory will create
protected string $contextImplementation
리턴 string

$contextInstances 보호되어 있는 프로퍼티

protected array $contextInstances
리턴 array

$now 보호되어 있는 프로퍼티

protected Now,Neos\Flow\Utility $now
리턴 Neos\Flow\Utility\Now

$securityContext 보호되어 있는 프로퍼티

protected Context,Neos\Flow\Security $securityContext
리턴 Neos\Flow\Security\Context