class TestHookRemove
Add a hook here, then remove it with another attribute.
Hierarchy
- class \Drupal\hook_test_remove\Hook\TestHookRemove
Expanded class hierarchy of TestHookRemove
File
-
core/
modules/ system/ tests/ modules/ hook_test_remove/ src/ Hook/ TestHookRemove.php, line 13
Namespace
Drupal\hook_test_remove\HookView source
class TestHookRemove {
/**
* This hook should not be run because the next hook replaces it.
*/
public function hookDoNotRun() : string {
// This hook should not run.
return __METHOD__;
}
/**
* This hook should run and prevent custom_hook1.
*/
public function hookDoRun() : string {
// This hook should run.
return __METHOD__;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
TestHookRemove::hookDoNotRun | public | function | This hook should not be run because the next hook replaces it. |
TestHookRemove::hookDoRun | public | function | This hook should run and prevent custom_hook1. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.