public function TranslatorManager::createUIInstance in Translation Management Tool 8
Returns a translator plugin UI instance.
Parameters
string $plugin: Name of the translator plugin.
Return value
\Drupal\tmgmt\TranslatorPluginUiInterface Instance a translator plugin UI instance.
File
- src/
TranslatorManager.php, line 47
Class
- TranslatorManager
- A plugin manager for translator plugins.
Namespace
Drupal\tmgmtCode
public function createUIInstance($plugin) {
if (!isset($this->ui[$plugin])) {
$definition = $this
->getDefinition($plugin);
$class = $definition['ui'];
$this->ui[$plugin] = new $class(array(), $plugin, $definition);
}
return $this->ui[$plugin];
}