Refer to 'ContextFactoryInterface' instead of 'ContextFactory' when
injecting this factory into your own class.
buildContextInstance()
protected method
This needs to be overridden if the Builder is extended.
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 |
|
return |
Context |
|
mergeContextPropertiesWithDefaults()
protected method
Merges the given context properties with sane defaults for the context implementation.
mergeTargetDimensionContextProperties()
protected method
validateContextProperties()
protected method
$contentDimensionRepository protected_oe property
protected ContentDimensionRepository,Neos\ContentRepository\Domain\Repository $contentDimensionRepository |
return |
Neos\ContentRepository\Domain\Repository\ContentDimensionRepository |
|
$contextImplementation protected_oe property
The context implementation this factory will create
protected string $contextImplementation |
return |
string |
|
$contextInstances protected_oe property
protected array $contextInstances |
return |
array |
|
$securityContext protected_oe property
protected Context,Neos\Flow\Security $securityContext |
return |
Neos\Flow\Security\Context |
|