You are here

public function ProviderFilterDecorator::__construct in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/migrate/src/Plugin/Discovery/ProviderFilterDecorator.php \Drupal\migrate\Plugin\Discovery\ProviderFilterDecorator::__construct()
  2. 10 core/modules/migrate/src/Plugin/Discovery/ProviderFilterDecorator.php \Drupal\migrate\Plugin\Discovery\ProviderFilterDecorator::__construct()

Constructs a InheritProviderDecorator object.

Parameters

\Drupal\Component\Plugin\Discovery\DiscoveryInterface $decorated: The object implementing DiscoveryInterface that is being decorated.

callable $provider_exists: A callable, gets passed a provider name, should return TRUE if the provider exists and FALSE if not.

File

core/modules/migrate/src/Plugin/Discovery/ProviderFilterDecorator.php, line 43

Class

ProviderFilterDecorator
Remove plugin definitions with non-existing providers.

Namespace

Drupal\migrate\Plugin\Discovery

Code

public function __construct(DiscoveryInterface $decorated, callable $provider_exists) {
  $this->decorated = $decorated;
  $this->providerExists = $provider_exists;
}