You are here

function trigger_example_pong in Examples for Developers 6

Function to generate pong events and invoke hook_trigger_example().

Related topics

1 call to trigger_example_pong()
trigger_example_form_submit in trigger_example/trigger_example.module

File

trigger_example/trigger_example.module, line 84

Code

function trigger_example_pong() {
  $count = variable_get('trigger_example_pings', 0);

  // Invoke hook_trigger_example() with the pong operation.
  module_invoke_all('trigger_example', 'pong', $count);
  variable_set('trigger_example_pings', max(0, $count - 1));
}