function ACrossHookReorderAlter::subtypeAlterLast
Implements the subtype alter hook.
In a call to ->alter(['..base', '..subtype'], ..), this method wants to be called after most other implementations, but not after ::baseAlterLastAlsoIfSubtype().
To achieve this, it has a #[ReorderHook] that targets ::baseAlterLastAlsoIfSubtype() in context of the subtype hook, meant to reinforce the Order::Last from that base hook implementation.
Attributes
#[Hook('test_cross_hook_reorder_subtype_alter', order: Order::Last)]
File
-
core/
modules/ system/ tests/ modules/ HookOrder/ aaa_hook_order_test/ src/ Hook/ ACrossHookReorderAlter.php, line 60
Class
- ACrossHookReorderAlter
- Contains alter hook implementations.
Namespace
Drupal\aaa_hook_order_test\HookCode
public function subtypeAlterLast(array &$calls) : void {
$calls[] = __METHOD__;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.