class DHooks

This class contains hook implementations.

By default, these will be called in module order, which is predictable due to the alphabetical module names.

Attributes

#[ReorderHook('test_hook', CHooks::class, 'testHookReorderFirst', Order::First)] #[RemoveHook('test_hook', CHooks::class, 'testHookRemoved')]

Hierarchy

  • class \Drupal\ddd_hook_order_test\Hook\DHooks

Expanded class hierarchy of DHooks

1 file declares its use of DHooks
HookOrderTest.php in core/tests/Drupal/KernelTests/Core/Hook/HookOrderTest.php

File

core/modules/system/tests/modules/HookOrder/ddd_hook_order_test/src/Hook/DHooks.php, line 19

Namespace

Drupal\ddd_hook_order_test\Hook
View source
class DHooks {
  public function testHook() : string {
    return __METHOD__;
  }
  public function sparseTestHook() : string {
    return __METHOD__;
  }

}

Members

Title Sort descending Modifiers Object type Summary
DHooks::sparseTestHook public function #[Hook('sparse_test_hook')]
DHooks::testHook public function #[Hook('test_hook')]

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