function HookDiscovery::__construct in Plug 7
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
- lib/
Drupal/ Core/ Plugin/ Discovery/ HookDiscovery.php, line 44 - Contains \Drupal\Core\Plugin\Discovery\HookDiscovery.
Class
- HookDiscovery
- Provides a hook-based plugin discovery class.
Namespace
Drupal\Core\Plugin\DiscoveryCode
function __construct(ModuleHandlerInterface $module_handler, $hook) {
$this->moduleHandler = $module_handler;
$this->hook = $hook;
}