function MigrateSource::setProviders

Same name in this branch
  1. 11.x core/modules/migrate/src/Annotation/MigrateSource.php \Drupal\migrate\Annotation\MigrateSource::setProviders()
Same name in other branches
  1. 9 core/modules/migrate/src/Annotation/MigrateSource.php \Drupal\migrate\Annotation\MigrateSource::setProviders()
  2. 8.9.x core/modules/migrate/src/Annotation/MigrateSource.php \Drupal\migrate\Annotation\MigrateSource::setProviders()
  3. 10 core/modules/migrate/src/Annotation/MigrateSource.php \Drupal\migrate\Annotation\MigrateSource::setProviders()

File

core/modules/migrate/src/Attribute/MigrateSource.php, line 87

Class

MigrateSource
Defines a MigrateSource attribute.

Namespace

Drupal\migrate\Attribute

Code

public function setProviders(array $providers) : void {
    if ($providers) {
        parent::setProvider(reset($providers));
    }
    else {
        $this->provider = NULL;
    }
    $this->providers = $providers;
}

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