function MigrateSourcePluginManager::findDefinitions

Finds plugin definitions.

@todo This provides backwards compatibility for migration source plugins using annotations and having more than one provider. This functionality will be deprecated with plugin discovery by annotations in https://www.drupal.org/project/drupal/issues/3522409.

Return value

array List of definitions to store in cache.

Overrides DefaultPluginManager::findDefinitions

File

core/modules/migrate/src/Plugin/MigrateSourcePluginManager.php, line 70

Class

MigrateSourcePluginManager
Plugin manager for migrate source plugins.

Namespace

Drupal\migrate\Plugin

Code

protected function findDefinitions() {
  $definitions = $this->getDiscovery()
    ->getDefinitions();
  foreach ($definitions as $plugin_id => &$definition) {
    $this->processDefinition($definition, $plugin_id);
  }
  $this->alterDefinitions($definitions);
  return ProviderFilterDecorator::filterDefinitions($definitions, function ($provider) {
    return $this->providerExists($provider);
  });
}

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