You are here

public function StaticDiscoveryDecorator::__construct in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Component/Plugin/Discovery/StaticDiscoveryDecorator.php \Drupal\Component\Plugin\Discovery\StaticDiscoveryDecorator::__construct()

Constructs a \Drupal\Component\Plugin\Discovery\StaticDiscoveryDecorator object.

Parameters

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

\Callable $registerDefinitions: (optional) A callback or closure used for registering additional definitions.

File

core/lib/Drupal/Component/Plugin/Discovery/StaticDiscoveryDecorator.php, line 33

Class

StaticDiscoveryDecorator
A decorator that allows manual registration of undiscoverable definitions.

Namespace

Drupal\Component\Plugin\Discovery

Code

public function __construct(DiscoveryInterface $decorated, $registerDefinitions = NULL) {
  $this->decorated = $decorated;
  $this->registerDefinitions = $registerDefinitions;
}