function TestHookRemove::hookDoRun
Same name and namespace in other branches
- 11.x core/modules/system/tests/modules/hook_test_remove/src/Hook/TestHookRemove.php \Drupal\hook_test_remove\Hook\TestHookRemove::hookDoRun()
This hook should run and prevent custom_hook1.
Attributes
#[Hook('custom_hook1')]
#[RemoveHook('custom_hook1', class: TestHookRemove::class, method: 'hookDoNotRun')]
File
-
core/
modules/ system/ tests/ modules/ hook_test_remove/ src/ Hook/ TestHookRemove.php, line 27
Class
- TestHookRemove
- Add a hook here, then remove it with another attribute.
Namespace
Drupal\hook_test_remove\HookCode
public function hookDoRun() : string {
// This hook should run.
return __METHOD__;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.