public function StaticDiscoveryDecorator::__construct in Plug 7
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;
}