src/Sulu/Component/Rest/ListBuilder/Doctrine/DoctrineListBuilder.php
protected function getUniqueExpressionFieldDescriptors(array $expressions)
    {
        if (0 === count($this->expressionFields)) {
            $descriptors = [];
            $uniqueNames = array_unique($this->getAllFieldNames($expressions));
            foreach ($uniqueNames as $uniqueName) {
                $descriptors[] = $this->fieldDescriptors[$uniqueName];
            }

            $this->expressionFields = $descriptors;

            return $descriptors;
        }

        return $this->expressionFields;
    }
protected function getUniqueExpressionFieldDescriptors(array $expressions)
    {
        if (0 === count($this->expressionFields)) {
            $descriptors = [];
            $uniqueNames = array_unique($this->getAllFieldNames($expressions));
            foreach ($uniqueNames as $uniqueName) {
                $descriptors[] = $this->fieldDescriptors[$uniqueName];
            }

            $this->expressionFields = $descriptors;

            return $descriptors;
        }

        return $this->expressionFields;
    }
protected function getUniqueExpressionFieldDescriptors ( array $ expressions ) { if ( 0 === count ( $ this -> expressionFields ) ) { $ descriptors = [ ] ; $ uniqueNames = array_unique ( $ this -> getAllFieldNames ( $ expressions ) ) ; foreach ( $ uniqueNames as $ uniqueName ) { $ descriptors [ ] = $ this -> fieldDescriptors [ $ uniqueName ] ; } $ this -> expressionFields = $ descriptors ; return $ descriptors ; } return $ this -> expressionFields ; }
Returns an array of unique expression field descriptors.

@param AbstractDoctrineExpression[] $expressions

@return array
Returns an array of unique expression field descriptors .