protected function buildMethodArgumentsEvaluationConditionCode(array $conditions, &$useGlobalObjects = false)
    {
        $argumentConstraintsConditionsCode = '';

        $isFirst = true;
        foreach ($conditions as $argumentName => $argumentConstraint) {
            $objectAccess = explode('.', $argumentName, 2);
            if (count($objectAccess) === 2) {
                $leftValue = '\Neos\Utility\ObjectAccess::getPropertyPath($joinPoint->getMethodArgument(\'' . $objectAccess[0] . '\'), \'' . $objectAccess[1] . '\')';
            } else {
                $leftValue = '$joinPoint->getMethodArgument(\'' . $argumentName . '\')';
            }

            for ($i = 0; $i < count($argumentConstraint['operator']); $i++) {
                $rightValue = $this->buildArgumentEvaluationAccessCode($argumentConstraint['value'][$i], $useGlobalObjects);

                if ($argumentConstraint['operator'][$i] === 'in') {
                    $argumentConstraintsConditionsCode .= ($isFirst === true ? '(' : ' && ') . '(' . $rightValue . ' instanceof \SplObjectStorage || ' . $rightValue . ' instanceof \Doctrine\Common\Collections\Collection ? ' . $leftValue . ' !== NULL && ' . $rightValue . '->contains(' . $leftValue  . ') : in_array(' . $leftValue . ', ' . $rightValue . '))';
                } elseif ($argumentConstraint['operator'][$i] === 'contains') {
                    $argumentConstraintsConditionsCode .= ($isFirst === true ? '(' : ' && ') . '(' . $leftValue . ' instanceof \SplObjectStorage || ' . $leftValue . ' instanceof \Doctrine\Common\Collections\Collection ? ' . $rightValue . ' !== NULL && ' . $leftValue . '->contains(' . $rightValue  . ') : in_array(' . $rightValue . ', ' . $leftValue . '))';
                } elseif ($argumentConstraint['operator'][$i] === 'matches') {
                    $argumentConstraintsConditionsCode .= ($isFirst === true ? '(' : ' && ') . '(!empty(array_intersect(' . $leftValue . ', ' . $rightValue . ')))';
                } else {
                    $argumentConstraintsConditionsCode .= ($isFirst === true ? '(' : ' && ') . $leftValue . ' ' . $argumentConstraint['operator'][$i] . ' ' . $rightValue;
                }

                $isFirst = false;
            }
        }

        return $argumentConstraintsConditionsCode . ')';
    }
protected function buildMethodArgumentsEvaluationConditionCode(array $conditions, &$useGlobalObjects = false)
    {
        $argumentConstraintsConditionsCode = '';

        $isFirst = true;
        foreach ($conditions as $argumentName => $argumentConstraint) {
            $objectAccess = explode('.', $argumentName, 2);
            if (count($objectAccess) === 2) {
                $leftValue = '\Neos\Utility\ObjectAccess::getPropertyPath($joinPoint->getMethodArgument(\'' . $objectAccess[0] . '\'), \'' . $objectAccess[1] . '\')';
            } else {
                $leftValue = '$joinPoint->getMethodArgument(\'' . $argumentName . '\')';
            }

            for ($i = 0; $i < count($argumentConstraint['operator']); $i++) {
                $rightValue = $this->buildArgumentEvaluationAccessCode($argumentConstraint['value'][$i], $useGlobalObjects);

                if ($argumentConstraint['operator'][$i] === 'in') {
                    $argumentConstraintsConditionsCode .= ($isFirst === true ? '(' : ' && ') . '(' . $rightValue . ' instanceof \SplObjectStorage || ' . $rightValue . ' instanceof \Doctrine\Common\Collections\Collection ? ' . $leftValue . ' !== NULL && ' . $rightValue . '->contains(' . $leftValue  . ') : in_array(' . $leftValue . ', ' . $rightValue . '))';
                } elseif ($argumentConstraint['operator'][$i] === 'contains') {
                    $argumentConstraintsConditionsCode .= ($isFirst === true ? '(' : ' && ') . '(' . $leftValue . ' instanceof \SplObjectStorage || ' . $leftValue . ' instanceof \Doctrine\Common\Collections\Collection ? ' . $rightValue . ' !== NULL && ' . $leftValue . '->contains(' . $rightValue  . ') : in_array(' . $rightValue . ', ' . $leftValue . '))';
                } elseif ($argumentConstraint['operator'][$i] === 'matches') {
                    $argumentConstraintsConditionsCode .= ($isFirst === true ? '(' : ' && ') . '(!empty(array_intersect(' . $leftValue . ', ' . $rightValue . ')))';
                } else {
                    $argumentConstraintsConditionsCode .= ($isFirst === true ? '(' : ' && ') . $leftValue . ' ' . $argumentConstraint['operator'][$i] . ' ' . $rightValue;
                }

                $isFirst = false;
            }
        }

        return $argumentConstraintsConditionsCode . ')';
    }
protected function buildMethodArgumentsEvaluationConditionCode ( array $ conditions , & $ useGlobalObjects = false ) { $ argumentConstraintsConditionsCode = '' ; $ isFirst = true ; foreach ( $ conditions as $ argumentName => $ argumentConstraint ) { $ objectAccess = explode ( '.' , $ argumentName , 2 ) ; if ( count ( $ objectAccess ) === 2 ) { $ leftValue = '\Neos\Utility\ObjectAccess::getPropertyPath($joinPoint->getMethodArgument(\'' . $ objectAccess [ 0 ] . '\'), \'' . $ objectAccess [ 1 ] . '\')' ; } else { $ leftValue = '$joinPoint->getMethodArgument(\'' . $ argumentName . '\')' ; } for ( $ i = 0 ; $ i < count ( $ argumentConstraint [ 'operator' ] ) ; $ i ++ ) { $ rightValue = $ this -> buildArgumentEvaluationAccessCode ( $ argumentConstraint [ 'value' ] [ $ i ] , $ useGlobalObjects ) ; if ( $ argumentConstraint [ 'operator' ] [ $ i ] === 'in' ) { $ argumentConstraintsConditionsCode .= ( $ isFirst === true ? '(' : ' && ' ) . '(' . $ rightValue . ' instanceof \SplObjectStorage || ' . $ rightValue . ' instanceof \Doctrine\Common\Collections\Collection ? ' . $ leftValue . ' !== NULL && ' . $ rightValue . '->contains(' . $ leftValue . ') : in_array(' . $ leftValue . ', ' . $ rightValue . '))' ; } elseif ( $ argumentConstraint [ 'operator' ] [ $ i ] === 'contains' ) { $ argumentConstraintsConditionsCode .= ( $ isFirst === true ? '(' : ' && ' ) . '(' . $ leftValue . ' instanceof \SplObjectStorage || ' . $ leftValue . ' instanceof \Doctrine\Common\Collections\Collection ? ' . $ rightValue . ' !== NULL && ' . $ leftValue . '->contains(' . $ rightValue . ') : in_array(' . $ rightValue . ', ' . $ leftValue . '))' ; } elseif ( $ argumentConstraint [ 'operator' ] [ $ i ] === 'matches' ) { $ argumentConstraintsConditionsCode .= ( $ isFirst === true ? '(' : ' && ' ) . '(!empty(array_intersect(' . $ leftValue . ', ' . $ rightValue . ')))' ; } else { $ argumentConstraintsConditionsCode .= ( $ isFirst === true ? '(' : ' && ' ) . $ leftValue . ' ' . $ argumentConstraint [ 'operator' ] [ $ i ] . ' ' . $ rightValue ; } $ isFirst = false ; } } return $ argumentConstraintsConditionsCode . ')' ; }
Returns the PHP code of the conditions used argument runtime evaluations

@param array $conditions Condition array
@param boolean &$useGlobalObjects Set to true if global objects are used by the condition
@return string The arguments condition code
Returns the PHP code of the conditions used argument runtime evaluations