class HookAttributeInvokeHook

Test Hook attribute named arguments.

Attributes

#[Hook('cache_flush')]

Hierarchy

Expanded class hierarchy of HookAttributeInvokeHook

File

core/modules/system/tests/modules/hook_collector_hook_attribute/src/Hook/HookAttributeInvokeHook.php, line 12

Namespace

Drupal\hook_collector_hook_attribute\Hook
View source
class HookAttributeInvokeHook {
  
  /**
   * Implements hook_cache_flush().
   */
  public function __invoke() : void {
    // Set a global value we can check in test code.
    $GLOBALS['hook_invoke_method'] = 'hook_invoke_method';
  }

}

Members

Title Sort descending Modifiers Object type Summary
HookAttributeInvokeHook::__invoke public function Implements hook_cache_flush().

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.