public function Job::canRequestTranslation

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 641

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