function MigrationPluginManager::createStubMigration

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

File

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

Class

MigrationPluginManager
Plugin manager for migration plugins.

Namespace

Drupal\migrate\Plugin

Code

public function createStubMigration(array $definition) {
    $id = $definition['id'] ?? uniqid();
    return Migration::create(\Drupal::getContainer(), [], $id, $definition);
}

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