You are here

public function SmartlingTranslator::abortTranslation in TMGMT Translator Smartling 8.3

Same name and namespace in other branches
  1. 8.4 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 657
Contains \Drupal\tmgmt_smartling\Plugin\tmgmt\Translator\SmartlingTranslator.

Class

SmartlingTranslator
Smartling translator plugin.

Namespace

Drupal\tmgmt_smartling\Plugin\tmgmt\Translator

Code

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);
}