You are here

public function Job::canRequestTranslation in Translation Management Tool 8

Checks whether a job is translatable.

Return value

\Drupal\tmgmt\Translator\TranslatableResult Whether the job can be translated or not.

Overrides JobInterface::canRequestTranslation

File

src/Entity/Job.php, line 635

Class

Job
Entity class for the tmgmt_job entity.

Namespace

Drupal\tmgmt\Entity

Code

public function canRequestTranslation() {
  if ($translator = $this
    ->getTranslator()) {
    return $translator
      ->checkTranslatable($this);
  }
  return TranslatableResult::no(t('Translation cant be requested.'));
}