public function SmartlingTranslator::abortTranslation in TMGMT Translator Smartling 8.4
Same name and namespace in other branches
- 8.3 src/Plugin/tmgmt/Translator/SmartlingTranslator.php \Drupal\tmgmt_smartling\Plugin\tmgmt\Translator\SmartlingTranslator::abortTranslation()
Aborts a translation job.
Parameters
\Drupal\tmgmt\JobInterface $job: The job that should have its translation aborted.
Return value
bool TRUE if the job could be aborted, FALSE otherwise.
Overrides TranslatorPluginBase::abortTranslation
File
- src/
Plugin/ tmgmt/ Translator/ SmartlingTranslator.php, line 692 - Contains \Drupal\tmgmt_smartling\Plugin\tmgmt\Translator\SmartlingTranslator.
Class
- SmartlingTranslator
- Smartling translator plugin.
Namespace
Drupal\tmgmt_smartling\Plugin\tmgmt\TranslatorCode
public function abortTranslation(JobInterface $job) {
$api_wrapper = $this
->getApiWrapper($job
->getTranslator()
->getSettings());
$api_wrapper
->createAuditLogRecord($job, NULL, $this->currentUser, CreateRecordParameters::ACTION_TYPE_CANCEL);
return parent::abortTranslation($job);
}