private function prepareFields(array $fields)
    {
        $preparedFields = [];

        foreach ($fields as $field) {
            $preparedFields[$field->getName()] = $field;
        }

        return $preparedFields;
    }
private function prepareFields(array $fields)
    {
        $preparedFields = [];

        foreach ($fields as $field) {
            $preparedFields[$field->getName()] = $field;
        }

        return $preparedFields;
    }
private function prepareFields ( array $ fields ) { $ preparedFields = [ ] ; foreach ( $ fields as $ field ) { $ preparedFields [ $ field -> getName ( ) ] = $ field ; } return $ preparedFields ; }
Prepare the array of fields to be added to the mapping. Mostly rekey the array.

@param array $fields Fields to be prepared.

@return FieldInterface[]
Prepare the array of fields to be added to the mapping . Mostly rekey the array .