public function Translator::checkAvailable in Translation Management Tool 8
Checks whether a translator is available.
Return value
\Drupal\tmgmt\Translator\AvailableResult TRUE if the translator plugin is available, FALSE otherwise.
Overrides TranslatorInterface::checkAvailable
File
- src/
Entity/ Translator.php, line 380
Class
- Translator
- Entity class for the tmgmt_translator entity.
Namespace
Drupal\tmgmt\EntityCode
public function checkAvailable() {
if ($plugin = $this
->getPlugin()) {
return $plugin
->checkAvailable($this);
}
return AvailableResult::no(t('@translator is not available. Make sure it is properly <a href=:configured>configured</a>.', [
'@translator' => $this
->label(),
':configured' => $this
->toUrl()
->toString(),
]));
}