class AAlterHooks

Same name and namespace in other branches
  1. 11.x core/modules/system/tests/modules/HookOrder/aaa_hook_order_test/src/Hook/AAlterHooks.php \Drupal\aaa_hook_order_test\Hook\AAlterHooks

This class contains hook implementations.

By default, these will be called in module order, which is predictable due to the alphabetical module names. Some of the implementations are reordered using order attributes.

Hierarchy

Expanded class hierarchy of AAlterHooks

See also

\Drupal\KernelTests\Core\Hook\HookAlterOrderTest

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

File

core/modules/system/tests/modules/HookOrder/aaa_hook_order_test/src/Hook/AAlterHooks.php, line 19

Namespace

Drupal\aaa_hook_order_test\Hook
View source
class AAlterHooks {
  
  /**
   * Implements hook_test_alter().
   *
   * This implementation changes its order to be after the hooks in module
   * 'ccc_hook_order_test'.
   */
  public function testAlterAfterC(array &$calls) : void {
    $calls[] = __METHOD__;
  }
  
  /**
   * Implements hook_test_subtype_alter().
   *
   * This implementation has no ordering modifications.
   */
  public function testSubtypeAlter(array &$calls) : void {
    $calls[] = __METHOD__;
  }

}

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