src/Sulu/Component/Rest/ListBuilder/AbstractListBuilder.php
protected function retrieveIndexOfFieldDescriptor(
        FieldDescriptorInterface $fieldDescriptor,
        array $fieldDescriptors
    ) {
        foreach ($fieldDescriptors as $index => $other) {
            if ($fieldDescriptor->compare($other)) {
                return $index;
            }
        }

        return false;
    }
protected function retrieveIndexOfFieldDescriptor(
        FieldDescriptorInterface $fieldDescriptor,
        array $fieldDescriptors
    ) {
        foreach ($fieldDescriptors as $index => $other) {
            if ($fieldDescriptor->compare($other)) {
                return $index;
            }
        }

        return false;
    }
protected function retrieveIndexOfFieldDescriptor ( FieldDescriptorInterface $ fieldDescriptor , array $ fieldDescriptors ) { foreach ( $ fieldDescriptors as $ index => $ other ) { if ( $ fieldDescriptor -> compare ( $ other ) ) { return $ index ; } } return false ; }
Returns index of given FieldDescriptor in given array of descriptors.
If no match is found, false will be returned.

@param FieldDescriptorInterface $fieldDescriptor
@param FieldDescriptorInterface[] $fieldDescriptors

@return bool|int|string
Returns index of given FieldDescriptor in given array of descriptors . If no match is found false will be returned .