Neos\Fusion\Core\Runtime::prepareContextForTypoScriptObject PHP Метод

prepareContextForTypoScriptObject() защищенный Метод

Returns if a new context was pushed to the stack or not.
protected prepareContextForTypoScriptObject ( AbstractTypoScriptObject $typoScriptObject, string $typoScriptPath, array $typoScriptConfiguration, array $cacheContext ) : boolean
$typoScriptObject Neos\Fusion\TypoScriptObjects\AbstractTypoScriptObject
$typoScriptPath string
$typoScriptConfiguration array
$cacheContext array
Результат boolean
    protected function prepareContextForTypoScriptObject(AbstractTypoScriptObject $typoScriptObject, $typoScriptPath, $typoScriptConfiguration, $cacheContext)
    {
        if ($cacheContext['cacheForPathDisabled'] === true) {
            $contextArray = $this->getCurrentContext();
            $newContextArray = [];
            foreach ($cacheContext['configuration']['context'] as $contextVariableName) {
                if (isset($contextArray[$contextVariableName])) {
                    $newContextArray[$contextVariableName] = $contextArray[$contextVariableName];
                }
            }
        }
        if (isset($typoScriptConfiguration['__meta']['context'])) {
            $newContextArray = isset($newContextArray) ? $newContextArray : $this->getCurrentContext();
            foreach ($typoScriptConfiguration['__meta']['context'] as $contextKey => $contextValue) {
                $newContextArray[$contextKey] = $this->evaluateInternal($typoScriptPath . '/__meta/context/' . $contextKey, self::BEHAVIOR_EXCEPTION, $typoScriptObject);
            }
        }
        if (isset($newContextArray)) {
            $this->pushContextArray($newContextArray);
            return true;
        }
        return false;
    }