public function StaticDiscoveryDecorator::__construct in Service Container 7
Same name and namespace in other branches
- 7.2 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
- lib/
Drupal/ Component/ Plugin/ Discovery/ StaticDiscoveryDecorator.php, line 38 - Contains \Drupal\Component\Plugin\Discovery\StaticDiscoveryDecorator.
Class
- StaticDiscoveryDecorator
- A decorator that allows manual registration of undiscoverable definitions.
Namespace
Drupal\Component\Plugin\DiscoveryCode
public function __construct(DiscoveryInterface $decorated, $registerDefinitions = NULL) {
$this->decorated = $decorated;
$this->registerDefinitions = $registerDefinitions;
}