Neos\ContentRepository\TypeConverter\NodeConverter::prepareContextProperties PHP Method

prepareContextProperties() protected method

Prepares the context properties for the nodes based on the given workspace and dimensions
protected prepareContextProperties ( string $workspaceName, Neos\Flow\Property\PropertyMappingConfigurationInterface $configuration = null, array $dimensions = null ) : array
$workspaceName string
$configuration Neos\Flow\Property\PropertyMappingConfigurationInterface
$dimensions array
return array
    protected function prepareContextProperties($workspaceName, PropertyMappingConfigurationInterface $configuration = null, array $dimensions = null)
    {
        $contextProperties = array('workspaceName' => $workspaceName, 'invisibleContentShown' => false, 'removedContentShown' => false);
        if ($workspaceName !== 'live') {
            $contextProperties['invisibleContentShown'] = true;
            if ($configuration !== null && $configuration->getConfigurationValue(\Neos\ContentRepository\TypeConverter\NodeConverter::class, self::REMOVED_CONTENT_SHOWN) === true) {
                $contextProperties['removedContentShown'] = true;
            }
        }
        if ($dimensions !== null) {
            $contextProperties['dimensions'] = $dimensions;
        }
        return $contextProperties;
    }