public function Translator::hasPlugin

Checks if the translator plugin of this translator exists.

Return value

bool Returns TRUE if it exists, FALSE otherwise.

Overrides TranslatorInterface::hasPlugin

File

src/Entity/Translator.php, line 276

Class

Translator
Entity class for the tmgmt_translator entity.

Namespace

Drupal\tmgmt\Entity

Code

public function hasPlugin() {
  if (!empty($this->plugin) && \Drupal::service('plugin.manager.tmgmt.translator')
    ->hasDefinition($this->plugin)) {
    return TRUE;
  }
  return FALSE;
}