You are here

public function Translator::checkTranslatable in Translation Management Tool 8

Check whether this translator can handle a particular translation job.

Parameters

\Drupal\tmgmt\JobInterface Job: The Job entity that should be translated.

Return value

\Drupal\tmgmt\Translator\TranslatableResult TRUE if the job can be processed and translated, FALSE otherwise.

Overrides TranslatorInterface::checkTranslatable

File

src/Entity/Translator.php, line 370

Class

Translator
Entity class for the tmgmt_translator entity.

Namespace

Drupal\tmgmt\Entity

Code

public function checkTranslatable(JobInterface $job) {
  if ($plugin = $this
    ->getPlugin()) {
    return $plugin
      ->checkTranslatable($this, $job);
  }
  return TranslatableResult::no(t('Missing provider plugin'));
}