You are here

public function MigrateDestinationPluginManager::createInstance in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/migrate/src/Plugin/MigrateDestinationPluginManager.php \Drupal\migrate\Plugin\MigrateDestinationPluginManager::createInstance()

A specific createInstance method is necessary to pass the migration on.

Overrides MigratePluginManager::createInstance

File

core/modules/migrate/src/Plugin/MigrateDestinationPluginManager.php, line 63
Contains \Drupal\migrate\Plugin\MigrateDestinationPluginManager.

Class

MigrateDestinationPluginManager
Plugin manager for migrate destination plugins.

Namespace

Drupal\migrate\Plugin

Code

public function createInstance($plugin_id, array $configuration = array(), MigrationInterface $migration = NULL) {
  if (substr($plugin_id, 0, 7) == 'entity:' && !$this->entityManager
    ->getDefinition(substr($plugin_id, 7), FALSE)) {
    $plugin_id = 'null';
  }
  return parent::createInstance($plugin_id, $configuration, $migration);
}