Neos\Fusion\ViewHelpers\TypoScriptContextTrait::getContextVariable PHP Метод

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

Note: This will return NULL if the variable didn't exist.
См. также: hasContextVariable()
protected getContextVariable ( string $variableName ) : mixed
$variableName string
Результат mixed
    protected function getContextVariable($variableName)
    {
        $value = null;
        $view = $this->viewHelperVariableContainer->getView();
        if ($view instanceof TypoScriptAwareViewInterface) {
            $typoScriptObject = $view->getTypoScriptObject();
            $currentContext = $typoScriptObject->getTsRuntime()->getCurrentContext();
            if (isset($currentContext[$variableName])) {
                $value = $currentContext[$variableName];
            }
        }
        return $value;
    }