You are here

function HookDiscovery::__construct in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 44
Contains \Drupal\Core\Plugin\Discovery\HookDiscovery.

Class

HookDiscovery
Provides a hook-based plugin discovery class.

Namespace

Drupal\Core\Plugin\Discovery

Code

function __construct(ModuleHandlerInterface $module_handler, $hook) {
  $this->moduleHandler = $module_handler;
  $this->hook = $hook;
}