Neos\Fusion\ViewHelpers\TypoScriptContextTrait::hasContextVariable PHP Method

hasContextVariable() protected method

protected hasContextVariable ( string $variableName ) : boolean
$variableName string
return boolean
    protected function hasContextVariable($variableName)
    {
        $view = $this->viewHelperVariableContainer->getView();
        if (!$view instanceof TypoScriptAwareViewInterface) {
            return false;
        }
        $typoScriptObject = $view->getTypoScriptObject();
        $currentContext = $typoScriptObject->getTsRuntime()->getCurrentContext();
        return array_key_exists($variableName, $currentContext);
    }