You are here

class CreateTranslationRequestParams in TMGMT Translator Smartling 8.4

Same name and namespace in other branches
  1. 8.3 vendor/smartling/api-sdk-php/src/TranslationRequests/Params/CreateTranslationRequestParams.php \Smartling\TranslationRequests\Params\CreateTranslationRequestParams

Class CreateTranslationRequestParams @package Smartling\TranslationRequests\Params

Hierarchy

Expanded class hierarchy of CreateTranslationRequestParams

6 files declare their use of CreateTranslationRequestParams
SmartlingApiWrapper.php in src/Smartling/SmartlingApiWrapper.php
SmartlingApiWrapper.php.
TranslationRequestManager.php in src/Smartling/Submission/TranslationRequestManager.php
TranslationRequestManagerTest.php in tests/src/Kernel/TranslationRequestManagerTest.php
TranslationRequestsApi.php in vendor/smartling/api-sdk-php/src/TranslationRequests/TranslationRequestsApi.php
TranslationRequestsApiFunctionalTest.php in vendor/smartling/api-sdk-php/tests/functional/TranslationRequestsApiFunctionalTest.php

... See full list

File

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

Namespace

Smartling\TranslationRequests\Params
View source
class CreateTranslationRequestParams extends TranslationRequestParamsAbstract {

  /**
   * @param string $translationRequestUid
   * @return $this
   */
  public function setTranslationRequestUid($translationRequestUid) {
    $this
      ->set('translationRequestUid', (string) $translationRequestUid);
    return $this;
  }

  /**
   * @param array $originalAssetKey
   * @return $this
   */
  public function setOriginalAssetKey(array $originalAssetKey = []) {
    $this
      ->set('originalAssetKey', $originalAssetKey);
    return $this;
  }

  /**
   * @param $fileUri
   * @return $this
   */
  public function setFileUri($fileUri) {
    $this
      ->set('fileUri', (string) $fileUri);
    return $this;
  }

  /**
   * @param $originalLocaleId
   * @return $this
   */
  public function setOriginalLocaleId($originalLocaleId) {
    $this
      ->set('originalLocaleId', (string) $originalLocaleId);
    return $this;
  }

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

}

Members