You are here

protected function MigrateExecutable::getSource in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/migrate/src/MigrateExecutable.php \Drupal\migrate\MigrateExecutable::getSource()
  2. 9 core/modules/migrate/src/MigrateExecutable.php \Drupal\migrate\MigrateExecutable::getSource()

Returns the source.

Makes sure source is initialized based on migration settings.

Return value

\Drupal\migrate\Plugin\MigrateSourceInterface The source.

3 calls to MigrateExecutable::getSource()
MigrateExecutable::currentSourceIds in core/modules/migrate/src/MigrateExecutable.php
Fetches the key array for the current source record.
MigrateExecutable::import in core/modules/migrate/src/MigrateExecutable.php
Performs an import operation - migrate items from source to destination.
TestMigrateExecutable::getSource in core/modules/migrate/tests/src/Kernel/TestMigrateExecutable.php
Returns the source.
1 method overrides MigrateExecutable::getSource()
TestMigrateExecutable::getSource in core/modules/migrate/tests/src/Kernel/TestMigrateExecutable.php
Returns the source.

File

core/modules/migrate/src/MigrateExecutable.php, line 126

Class

MigrateExecutable
Defines a migrate executable class.

Namespace

Drupal\migrate

Code

protected function getSource() {
  if (!isset($this->source)) {
    $this->source = $this->migration
      ->getSourcePlugin();
  }
  return $this->source;
}