function MigrateExecutable::getSource

Same name in other branches
  1. 9 core/modules/migrate/src/MigrateExecutable.php \Drupal\migrate\MigrateExecutable::getSource()
  2. 10 core/modules/migrate/src/MigrateExecutable.php \Drupal\migrate\MigrateExecutable::getSource()
  3. 11.x 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.

2 calls to MigrateExecutable::getSource()
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 128

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;
}

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