You are here

public function SmartlingApiWrapper::updateTranslationRequest in TMGMT Translator Smartling 8.4

Parameters

$bucketName:

$translationRequestUid:

\Smartling\TranslationRequests\Params\UpdateTranslationRequestParams $params:

Return value

null

File

src/Smartling/SmartlingApiWrapper.php, line 377
SmartlingApiWrapper.php.

Class

SmartlingApiWrapper
Class SmartlingApiWrapper @package Drupal\tmgmt_smartling\Smartling

Namespace

Drupal\tmgmt_smartling\Smartling

Code

public function updateTranslationRequest($bucketName, $translationRequestUid, UpdateTranslationRequestParams $params) {
  $result = FALSE;
  try {
    $result = $this
      ->getApi('translation_request')
      ->updateTranslationRequest($bucketName, $translationRequestUid, $params);
  } catch (SmartlingApiException $e) {
    $this->logger
      ->error('Smartling failed to update translation request:<br/>
      Bucket name: @bucket
      Params: @params
      Error: @error', [
      '@bucket' => $bucketName,
      '@params' => json_encode($params
        ->exportToArray()),
      '@error' => $e
        ->getMessage(),
    ]);
  }
  return $result;
}