TranslationSubmissionParamsAbstract.php in TMGMT Translator Smartling 8.4
File
vendor/smartling/api-sdk-php/src/TranslationRequests/Params/TranslationSubmissionParamsAbstract.php
View source
<?php
namespace Smartling\TranslationRequests\Params;
abstract class TranslationSubmissionParamsAbstract extends ParamsAbstract {
public function setTargetAssetKey(array $targetAssetKey = []) {
$this
->set('targetAssetKey', $targetAssetKey);
return $this;
}
public function setState($state) {
$state = (string) $state;
if (in_array($state, TranslationSubmissionStates::$allowedStates, true)) {
$this
->set('state', $state);
}
else {
throw new \UnexpectedValueException(vsprintf('Invalid \'state\' value \'%s\', expected one of: %s', [
$state,
implode('|', TranslationSubmissionStates::$allowedStates),
]));
}
return $this;
}
public function setSubmitterName($submitterName) {
$this
->set('submitterName', (string) $submitterName);
return $this;
}
public function setCustomTranslationData(array $customTranslationData = []) {
$this
->set('customTranslationData', $customTranslationData);
return $this;
}
public function setSubmittedDate(\DateTime $submittedDate) {
$this
->set('submittedDate', $submittedDate
->format(static::DATE_TIME_FORMAT));
return $this;
}
public function setLastExportedDate(\DateTime $lastExportDate) {
$this
->set('lastExportedDate', $lastExportDate
->format(static::DATE_TIME_FORMAT));
return $this;
}
public function setLastErrorMessage($lastErrorMessage) {
$this
->set('lastErrorMessage', (string) $lastErrorMessage);
return $this;
}
}