public function HookDiscovery::__construct in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Plugin/Discovery/HookDiscovery.php \Drupal\Core\Plugin\Discovery\HookDiscovery::__construct()
- 9 core/lib/Drupal/Core/Plugin/Discovery/HookDiscovery.php \Drupal\Core\Plugin\Discovery\HookDiscovery::__construct()
Constructs a Drupal\Core\Plugin\Discovery\HookDiscovery object.
Parameters
\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.
string $hook: The Drupal hook that a module can implement in order to interface to this discovery class.
File
- core/
lib/ Drupal/ Core/ Plugin/ Discovery/ HookDiscovery.php, line 39
Class
- HookDiscovery
- Provides a hook-based plugin discovery class.
Namespace
Drupal\Core\Plugin\DiscoveryCode
public function __construct(ModuleHandlerInterface $module_handler, $hook) {
$this->moduleHandler = $module_handler;
$this->hook = $hook;
}