You are here

public function InfoHookDecorator::__construct in Plug 7

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

lib/Drupal/Core/Plugin/Discovery/InfoHookDecorator.php, line 42
Contains \Drupal\Core\Plugin\Discovery\InfoHookDecorator.

Class

InfoHookDecorator
Allows info hook implementations to enhance discovered plugin definitions.

Namespace

Drupal\Core\Plugin\Discovery

Code

public function __construct(DiscoveryInterface $decorated, $hook) {
  $this->decorated = $decorated;
  $this->hook = $hook;
}