You are here

function TMGMTTestTranslatorPluginController::canTranslate in Translation Management Tool 7

Check whether this service can handle a particular translation job.

Parameters

TMGMTTranslator $translator: The TMGMTTranslator entity that should handle the translation.

TMGMTJob $job: The TMGMTJob entity that should be translated.

Return value

boolean TRUE if the job can be processed and translated, FALSE otherwise.

Overrides TMGMTDefaultTranslatorPluginController::canTranslate

File

tests/tmgmt_test.plugin.translator.inc, line 77
Cotains the test translator plugin.

Class

TMGMTTestTranslatorPluginController
@file Cotains the test translator plugin.

Code

function canTranslate(TMGMTTranslator $translator, TMGMTJob $job) {
  if (isset($job->settings['action']) && $job->settings['action'] == 'not_translatable') {
    return FALSE;
  }
  return parent::canTranslate($translator, $job);
}