You are here

public function MigrateSource::getProviders in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/migrate/src/Annotation/MigrateSource.php \Drupal\migrate\Annotation\MigrateSource::getProviders()

Gets the provider names of the annotated class.

Return value

string[] The providers of the annotation.

Overrides MultipleProviderAnnotationInterface::getProviders

File

core/modules/migrate/src/Annotation/MigrateSource.php, line 81

Class

MigrateSource
Defines a migration source plugin annotation object.

Namespace

Drupal\migrate\Annotation

Code

public function getProviders() {
  if (isset($this->definition['provider'])) {

    // Ensure that we return an array even if
    // \Drupal\Component\Annotation\AnnotationInterface::setProvider() has
    // been called.
    return (array) $this->definition['provider'];
  }
  return [];
}