You are here

public function ContactStorageExportService::encodeData in Contact Storage Export 8

Returns the encoded contact messages.

Parameters

string[] $data: A serialized contact message data.

string $format: (optional) The encoding format. Defaults to CSV.

Return value

string The encoded data.

1 call to ContactStorageExportService::encodeData()
ContactStorageExportService::encode in src/ContactStorageExportService.php
Returns the encoded contact messages.

File

src/ContactStorageExportService.php, line 294

Class

ContactStorageExportService
Provides a set of methods to export contact messages in CSV format.

Namespace

Drupal\contact_storage_export

Code

public function encodeData(array $data, $format = 'csv') {
  return $this->csvEncoder
    ->encode($data, $format);
}