Neos.Fusion/Classes/Core/Runtime.php
protected function evaluateEelExpression($expression, AbstractFusionObject $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 Fusion object.', 1344325044);
        }
        $contextVariables['this'] = $contextObject;

        if ($this->eelEvaluator instanceof \Neos\Flow\ObjectManagement\DependencyInjection\DependencyProxy) {
            $this->eelEvaluator->_activateDependency();
        }

        return EelUtility::evaluateEelExpression($expression, $this->eelEvaluator, $contextVariables);
    }
protected function evaluateEelExpression($expression, AbstractFusionObject $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 Fusion object.', 1344325044);
        }
        $contextVariables['this'] = $contextObject;

        if ($this->eelEvaluator instanceof \Neos\Flow\ObjectManagement\DependencyInjection\DependencyProxy) {
            $this->eelEvaluator->_activateDependency();
        }

        return EelUtility::evaluateEelExpression($expression, $this->eelEvaluator, $contextVariables);
    }
protected function evaluateEelExpression ( $ expression , AbstractFusionObject $ 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 Fusion object.' , 1344325044 ) ; } $ contextVariables [ 'this' ] = $ contextObject ; if ( $ this -> eelEvaluator instanceof \ Neos \ Flow \ ObjectManagement \ DependencyInjection \ DependencyProxy ) { $ this -> eelEvaluator -> _activateDependency ( ) ; } return EelUtility :: evaluateEelExpression ( $ expression , $ this -> eelEvaluator , $ contextVariables ) ; }
Evaluate an Eel expression

@param string $expression The Eel expression to evaluate
@param \Neos\Fusion\FusionObjects\AbstractFusionObject $contextObject An optional object for the "this" value inside the context
@return mixed The result of the evaluated Eel expression
@throws Exception
Evaluate an Eel expression