function HookDependsOnModule::__construct

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Hook/Attribute/HookDependsOnModule.php \Drupal\Core\Hook\Attribute\HookDependsOnModule::__construct()

Constructs HookDependsOnModule attribute object.

Parameters

string $module: The name of the module that the hook depends on.

File

core/lib/Drupal/Core/Hook/Attribute/HookDependsOnModule.php, line 31

Class

HookDependsOnModule
Makes hook registration dependent on a module being installed.

Namespace

Drupal\Core\Hook\Attribute

Code

public function __construct(public readonly string $module) {
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.