function XyzMissingTargetHooks::targetUnrelatedHookForBHook

Hook order attributes where the target method implements a different hook.

For non-alter hooks, such attributes have no effect.

This scenario can be relevant if the target method is registered for different hooks in different versions of the target module.

Attributes

#[ReorderHook('test_b_hook', AMissingTargetHooks::class, 'testUnrelatedHookReorderedLastForHookB', Order::Last)] #[RemoveHook('test_b_hook', AMissingTargetHooks::class, 'testUnrelatedHookRemovedForHookB')]

File

core/modules/system/tests/modules/HookOrder/xyz_hook_order_test/src/Hook/XyzMissingTargetHooks.php, line 54

Class

XyzMissingTargetHooks
This class contains attributes to reorder or remove hook implementations.

Namespace

Drupal\xyz_hook_order_test\Hook

Code

public function targetUnrelatedHookForBHook() : void {
}

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