protected function buildArgumentEvaluationAccessCode($argumentAccess, &$useGlobalObjects = false)
    {
        if (is_array($argumentAccess)) {
            $valuesAccessCodes = [];
            foreach ($argumentAccess as $singleValue) {
                $valuesAccessCodes[] = $this->buildArgumentEvaluationAccessCode($singleValue);
            }
            $argumentAccessCode = 'array(' . implode(', ', $valuesAccessCodes) . ')';
        } else {
            $objectAccess = explode('.', $argumentAccess, 2);
            if (count($objectAccess) === 2 && $objectAccess[0] === 'current') {
                $objectAccess = explode('.', $objectAccess[1], 2);
                if (count($objectAccess) === 1) {
                    $argumentAccessCode = '$globalObjects[\'' . $objectAccess[0] . '\']';
                } else {
                    $argumentAccessCode = '\Neos\Utility\ObjectAccess::getPropertyPath($globalObjects[\'' . $objectAccess[0] . '\'], \'' . $objectAccess[1] . '\')';
                }

                $useGlobalObjects = true;
            } elseif (count($objectAccess) === 2 && $objectAccess[0] === 'this') {
                $argumentAccessCode = '\Neos\Utility\ObjectAccess::getPropertyPath($currentObject, \'' . $objectAccess[1] . '\')';
            } else {
                $argumentAccessCode = $argumentAccess;
            }
        }

        return $argumentAccessCode;
    }
protected function buildArgumentEvaluationAccessCode($argumentAccess, &$useGlobalObjects = false)
    {
        if (is_array($argumentAccess)) {
            $valuesAccessCodes = [];
            foreach ($argumentAccess as $singleValue) {
                $valuesAccessCodes[] = $this->buildArgumentEvaluationAccessCode($singleValue);
            }
            $argumentAccessCode = 'array(' . implode(', ', $valuesAccessCodes) . ')';
        } else {
            $objectAccess = explode('.', $argumentAccess, 2);
            if (count($objectAccess) === 2 && $objectAccess[0] === 'current') {
                $objectAccess = explode('.', $objectAccess[1], 2);
                if (count($objectAccess) === 1) {
                    $argumentAccessCode = '$globalObjects[\'' . $objectAccess[0] . '\']';
                } else {
                    $argumentAccessCode = '\Neos\Utility\ObjectAccess::getPropertyPath($globalObjects[\'' . $objectAccess[0] . '\'], \'' . $objectAccess[1] . '\')';
                }

                $useGlobalObjects = true;
            } elseif (count($objectAccess) === 2 && $objectAccess[0] === 'this') {
                $argumentAccessCode = '\Neos\Utility\ObjectAccess::getPropertyPath($currentObject, \'' . $objectAccess[1] . '\')';
            } else {
                $argumentAccessCode = $argumentAccess;
            }
        }

        return $argumentAccessCode;
    }
protected function buildArgumentEvaluationAccessCode ( $ argumentAccess , & $ useGlobalObjects = false ) { if ( is_array ( $ argumentAccess ) ) { $ valuesAccessCodes = [ ] ; foreach ( $ argumentAccess as $ singleValue ) { $ valuesAccessCodes [ ] = $ this -> buildArgumentEvaluationAccessCode ( $ singleValue ) ; } $ argumentAccessCode = 'array(' . implode ( ', ' , $ valuesAccessCodes ) . ')' ; } else { $ objectAccess = explode ( '.' , $ argumentAccess , 2 ) ; if ( count ( $ objectAccess ) === 2 && $ objectAccess [ 0 ] === 'current' ) { $ objectAccess = explode ( '.' , $ objectAccess [ 1 ] , 2 ) ; if ( count ( $ objectAccess ) === 1 ) { $ argumentAccessCode = '$globalObjects[\'' . $ objectAccess [ 0 ] . '\']' ; } else { $ argumentAccessCode = '\Neos\Utility\ObjectAccess::getPropertyPath($globalObjects[\'' . $ objectAccess [ 0 ] . '\'], \'' . $ objectAccess [ 1 ] . '\')' ; } $ useGlobalObjects = true ; } elseif ( count ( $ objectAccess ) === 2 && $ objectAccess [ 0 ] === 'this' ) { $ argumentAccessCode = '\Neos\Utility\ObjectAccess::getPropertyPath($currentObject, \'' . $ objectAccess [ 1 ] . '\')' ; } else { $ argumentAccessCode = $ argumentAccess ; } } return $ argumentAccessCode ; }
Returns the PHP code used to access one argument of a runtime evaluation

@param mixed $argumentAccess The unparsed argument access, might be string or array
@param boolean &$useGlobalObjects Set to true if global objects are used by the condition
@return string The condition code
Returns the PHP code used to access one argument of a runtime evaluation