You are here

public function Migration::getSourcePlugin in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/migrate/src/Plugin/Migration.php \Drupal\migrate\Plugin\Migration::getSourcePlugin()
  2. 10 core/modules/migrate/src/Plugin/Migration.php \Drupal\migrate\Plugin\Migration::getSourcePlugin()

Returns the initialized source plugin.

Return value

\Drupal\migrate\Plugin\MigrateSourceInterface The source plugin.

Overrides MigrationInterface::getSourcePlugin

1 call to Migration::getSourcePlugin()
Migration::checkRequirements in core/modules/migrate/src/Plugin/Migration.php
Checks if requirements for this plugin are OK.

File

core/modules/migrate/src/Plugin/Migration.php, line 348

Class

Migration
Defines the Migration plugin.

Namespace

Drupal\migrate\Plugin

Code

public function getSourcePlugin() {
  if (!isset($this->sourcePlugin)) {
    $this->sourcePlugin = $this->sourcePluginManager
      ->createInstance($this->source['plugin'], $this->source, $this);
  }
  return $this->sourcePlugin;
}