function MigrationPluginManager::createInstance

Same name in other branches
  1. 9 core/modules/migrate/src/Plugin/MigrationPluginManager.php \Drupal\migrate\Plugin\MigrationPluginManager::createInstance()
  2. 8.9.x core/modules/migrate/src/Plugin/MigrationPluginManager.php \Drupal\migrate\Plugin\MigrationPluginManager::createInstance()
  3. 10 core/modules/migrate/src/Plugin/MigrationPluginManager.php \Drupal\migrate\Plugin\MigrationPluginManager::createInstance()

Overrides PluginManagerBase::createInstance

File

core/modules/migrate/src/Plugin/MigrationPluginManager.php, line 92

Class

MigrationPluginManager
Plugin manager for migration plugins.

Namespace

Drupal\migrate\Plugin

Code

public function createInstance($plugin_id, array $configuration = []) {
    $instances = $this->createInstances([
        $plugin_id,
    ], [
        $plugin_id => $configuration,
    ]);
    return reset($instances);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.