protected function getContextNode() { $baseNode = null; $view = $this->viewHelperVariableContainer->getView(); if ($view instanceof TypoScriptAwareViewInterface) { $typoScriptObject = $view->getTypoScriptObject(); $currentContext = $typoScriptObject->getTsRuntime()->getCurrentContext(); if (isset($currentContext['node'])) { $baseNode = $currentContext['node']; } } return $baseNode; }