class ACrossHookReorderAlter
Contains alter hook implementations.
Hierarchy
- class \Drupal\aaa_hook_order_test\Hook\ACrossHookReorderAlter
Expanded class hierarchy of ACrossHookReorderAlter
See also
\Drupal\KernelTests\Core\Hook\HookAlterOrderTest::testReorderCrossHookAlter()
1 file declares its use of ACrossHookReorderAlter
- HookAlterOrderTest.php in core/
tests/ Drupal/ KernelTests/ Core/ Hook/ HookAlterOrderTest.php
File
-
core/
modules/ system/ tests/ modules/ HookOrder/ aaa_hook_order_test/ src/ Hook/ ACrossHookReorderAlter.php, line 16
Namespace
Drupal\aaa_hook_order_test\HookView source
class ACrossHookReorderAlter {
/**
* Implements hook_test_cross_hook_reorder_base_alter().
*/
public function baseAlterLast(array &$calls) : void {
$calls[] = __METHOD__;
}
/**
* Implements hook_test_cross_hook_reorder_base_alter().
*
* This method implements the base alter hook, and has an Order::Last rule.
* In addition, it is targeted by a #[ReorderHook] for the subtype alter hook.
*
* @see self::subtypeAlterLast()
*/
public function baseAlterLastAlsoIfSubtype(array &$calls) : void {
$calls[] = __METHOD__;
}
/**
* Implements hook_test_cross_hook_reorder_base_alter().
*/
public function baseAlterLastIfSubtype(array &$calls) : void {
$calls[] = __METHOD__;
}
/**
* 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.
*/
public function subtypeAlterLast(array &$calls) : void {
$calls[] = __METHOD__;
}
/**
* Implements hook_test_cross_hook_reorder_subtype_alter().
*/
public function subtypeAlterLastIfBaseHook(array &$calls) : void {
$calls[] = __METHOD__;
}
/**
* Implements hook_test_cross_hook_reorder_base_alter().
*/
public function baseAlter(array &$calls) : void {
$calls[] = __METHOD__;
}
/**
* Implements test_cross_hook_reorder_subtype_alter().
*/
public function subtypeAlter(array &$calls) : void {
$calls[] = __METHOD__;
}
}
Members
| Title Sort descending | Modifiers | Object type | Summary |
|---|---|---|---|
| ACrossHookReorderAlter::baseAlter | public | function | Implements hook_test_cross_hook_reorder_base_alter(). |
| ACrossHookReorderAlter::baseAlterLast | public | function | Implements hook_test_cross_hook_reorder_base_alter(). |
| ACrossHookReorderAlter::baseAlterLastAlsoIfSubtype | public | function | Implements hook_test_cross_hook_reorder_base_alter(). |
| ACrossHookReorderAlter::baseAlterLastIfSubtype | public | function | Implements hook_test_cross_hook_reorder_base_alter(). |
| ACrossHookReorderAlter::subtypeAlter | public | function | Implements test_cross_hook_reorder_subtype_alter(). |
| ACrossHookReorderAlter::subtypeAlterLast | public | function | Implements the subtype alter hook. |
| ACrossHookReorderAlter::subtypeAlterLastIfBaseHook | public | function | Implements hook_test_cross_hook_reorder_subtype_alter(). |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.