src/Sulu/Component/Rest/ListBuilder/Doctrine/DoctrineListBuilder.php
protected function getEntityNamesOfFieldDescriptors($filterFields)
    {
        $fields = [];

        // filter array for DoctrineFieldDescriptors
        foreach ($filterFields as $field) {
            // add joins of field
            $fields = array_merge($fields, $field->getJoins());

            if ($field instanceof DoctrineFieldDescriptor
                || $field instanceof DoctrineJoinDescriptor
            ) {
                $fields[] = $field;
            }
        }

        $fieldEntityNames = [];
        foreach ($fields as $key => $field) {
            // special treatment for join descriptors
            if ($field instanceof DoctrineJoinDescriptor) {
                $fieldEntityNames[] = $key;
            }
            $fieldEntityNames[] = $field->getEntityName();
        }

        // unify result
        return array_unique($fieldEntityNames);
    }
protected function getEntityNamesOfFieldDescriptors($filterFields)
    {
        $fields = [];

        // filter array for DoctrineFieldDescriptors
        foreach ($filterFields as $field) {
            // add joins of field
            $fields = array_merge($fields, $field->getJoins());

            if ($field instanceof DoctrineFieldDescriptor
                || $field instanceof DoctrineJoinDescriptor
            ) {
                $fields[] = $field;
            }
        }

        $fieldEntityNames = [];
        foreach ($fields as $key => $field) {
            // special treatment for join descriptors
            if ($field instanceof DoctrineJoinDescriptor) {
                $fieldEntityNames[] = $key;
            }
            $fieldEntityNames[] = $field->getEntityName();
        }

        // unify result
        return array_unique($fieldEntityNames);
    }
protected function getEntityNamesOfFieldDescriptors ( $ filterFields ) { $ fields = [ ] ; // filter array for DoctrineFieldDescriptors foreach ( $ filterFields as $ field ) { // add joins of field $ fields = array_merge ( $ fields , $ field -> getJoins ( ) ) ; if ( $ field instanceof DoctrineFieldDescriptor || $ field instanceof DoctrineJoinDescriptor ) { $ fields [ ] = $ field ; } } $ fieldEntityNames = [ ] ; foreach ( $ fields as $ key => $ field ) { // special treatment for join descriptors if ( $ field instanceof DoctrineJoinDescriptor ) { $ fieldEntityNames [ ] = $ key ; } $ fieldEntityNames [ ] = $ field -> getEntityName ( ) ; } // unify result return array_unique ( $ fieldEntityNames ) ; }
Returns array of field-descriptor aliases.

@param array $filterFields

@return string[]
Returns array of field - descriptor aliases .