protected function evaluateEelExpression($expression, AbstractTypoScriptObject $contextObject = null)
{
if ($expression[0] !== '$' || $expression[1] !== '{') {
// We still assume this is an EEL expression and wrap the markers for backwards compatibility.
$expression = '${' . $expression . '}';
}
$contextVariables = array_merge($this->getDefaultContextVariables(), $this->getCurrentContext());
if (isset($contextVariables['this'])) {
throw new Exception('Context variable "this" not allowed, as it is already reserved for a pointer to the current TypoScript object.', 1344325044);
}
$contextVariables['this'] = $contextObject;
if ($this->eelEvaluator instanceof \Neos\Flow\ObjectManagement\DependencyInjection\DependencyProxy) {
$this->eelEvaluator->_activateDependency();
}
return EelUtility::evaluateEelExpression($expression, $this->eelEvaluator, $contextVariables);
}