public function FormatManager::createUIInstance

Returns a source plugin UI instance.

Parameters

string $plugin: Name of the source plugin.

Return value

\Drupal\tmgmt\SourcePluginUiInterface Instance a source plugin UI instance.

File

translators/tmgmt_file/src/Format/FormatManager.php, line 51

Class

FormatManager
A plugin manager for file format plugins.

Namespace

Drupal\tmgmt_file\Format

Code

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];
}