function TestHookInvoke::hookInvokeSingleArrayObjectTwo
Same name and namespace in other branches
- 11.x core/modules/system/tests/modules/hook_single_invoke/src/Hook/TestHookInvoke.php \Drupal\hook_single_invoke\Hook\TestHookInvoke::hookInvokeSingleArrayObjectTwo()
This hook returns an ArrayObject.
Attributes
#[Hook('custom_hook_invoke_array_object')]
Return value
\ArrayObject< int, string > ArrayObject of the method.
File
-
core/
modules/ system/ tests/ modules/ hook_single_invoke/ src/ Hook/ TestHookInvoke.php, line 47
Class
- TestHookInvoke
- Add four hook implementations for two hooks, one returns arrays one string.
Namespace
Drupal\hook_single_invoke\HookCode
public function hookInvokeSingleArrayObjectTwo() : \ArrayObject {
return new \ArrayObject([
__METHOD__,
]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.