You are here

public function TranslatorPluginBase::checkAvailable in Translation Management Tool 8

Checks whether a translator is available.

Parameters

TranslatorInterface $translator: The translator entity.

Return value

\Drupal\tmgmt\Translator\AvailableResult The result of the availability check.

Overrides TranslatorPluginInterface::checkAvailable

1 call to TranslatorPluginBase::checkAvailable()
TestTranslator::checkAvailable in tmgmt_test/src/Plugin/tmgmt/Translator/TestTranslator.php
Checks whether a translator is available.
1 method overrides TranslatorPluginBase::checkAvailable()
TestTranslator::checkAvailable in tmgmt_test/src/Plugin/tmgmt/Translator/TestTranslator.php
Checks whether a translator is available.

File

src/TranslatorPluginBase.php, line 33

Class

TranslatorPluginBase
Default controller class for service plugins.

Namespace

Drupal\tmgmt

Code

public function checkAvailable(TranslatorInterface $translator) {

  // Assume that the translation service is always available.
  return AvailableResult::yes();
}