You are here

public function CreateTranslationRequestParams::addTranslationSubmission in TMGMT Translator Smartling 8.3

Same name and namespace in other branches
  1. 8.4 vendor/smartling/api-sdk-php/src/TranslationRequests/Params/CreateTranslationRequestParams.php \Smartling\TranslationRequests\Params\CreateTranslationRequestParams::addTranslationSubmission()

Parameters

CreateTranslationSubmissionParams $translationSubmission:

Return value

$this

File

vendor/smartling/api-sdk-php/src/TranslationRequests/Params/CreateTranslationRequestParams.php, line 55

Class

CreateTranslationRequestParams
Class CreateTranslationRequestParams @package Smartling\TranslationRequests\Params

Namespace

Smartling\TranslationRequests\Params

Code

public function addTranslationSubmission(CreateTranslationSubmissionParams $translationSubmission) {
  if (!array_key_exists('translationSubmissions', $this->params)) {
    $this
      ->set('translationSubmissions', []);
  }
  $this->params['translationSubmissions'][] = $translationSubmission
    ->exportToArray();
  return $this;
}