public function InfoHookDecorator::__construct in Drupal 8
Same name and namespace in other branches
- 9 core/lib/Drupal/Core/Plugin/Discovery/InfoHookDecorator.php \Drupal\Core\Plugin\Discovery\InfoHookDecorator::__construct()
Constructs a InfoHookDecorator object.
Parameters
\Drupal\Component\Plugin\Discovery\DiscoveryInterface $decorated: The object implementing DiscoveryInterface that is being decorated.
string $hook: The name of the info hook to be invoked by this discovery instance.
File
- core/
lib/ Drupal/ Core/ Plugin/ Discovery/ InfoHookDecorator.php, line 37
Class
- InfoHookDecorator
- Allows info hook implementations to enhance discovered plugin definitions.
Namespace
Drupal\Core\Plugin\DiscoveryCode
public function __construct(DiscoveryInterface $decorated, $hook) {
$this->decorated = $decorated;
$this->hook = $hook;
}