You are here

function reroute_email_test_module_implements_alter in Reroute Email 7

Same name and namespace in other branches
  1. 8 tests/modules/reroute_email_test/reroute_email_test.module \reroute_email_test_module_implements_alter()
  2. 2.x tests/modules/reroute_email_test/reroute_email_test.module \reroute_email_test_module_implements_alter()

Implements hook_module_implements_alter().

Ensure reroute_email_test runs last when hook_mail_alter is invoked.

File

tests/reroute_email_test.module, line 13
Provides Mail hook implementations for testing the Reroute Email module.

Code

function reroute_email_test_module_implements_alter(&$implementations, $hook) {

  // Testing with isset is only necessary if module doesn't implement the hook.
  if ($hook == 'mail_alter') {

    // Move our hook implementation to the bottom.
    $group = $implementations['reroute_email_test'];
    unset($implementations['reroute_email_test']);
    $implementations['reroute_email_test'] = $group;
  }
}