public function GlExchangeAdapter::getPdDocument in GlobalLink Connect for Drupal 8
Same name and namespace in other branches
- 8.2 src/GlExchangeAdapter.php \Drupal\globallink\GlExchangeAdapter::getPdDocument()
Get the PDDocument object.
Parameters
array $parameters: Array of parameters, where the expected structure is:
- name: (string) the name for this document,
- source_language: (string) source language,
- target_languages: (array) list of target languages,
- data': xliff data
Return value
\PDDocument The pdd document object.
File
- src/
GlExchangeAdapter.php, line 124
Class
- GlExchangeAdapter
- Provides an interface to the provided library.
Namespace
Drupal\globallinkCode
public function getPdDocument($parameters) {
$document = new \PDDocument();
$document->fileformat = $parameters['classifier'];
$document->name = $parameters['name'];
$document->sourceLanguage = $parameters['source_language'];
$document->targetLanguages = $parameters['target_languages'];
$document->data = $parameters['data'];
$document->clientIdentifier = $parameters['client_identifier'];
return $document;
}