You are here

function ip2country_test_ip2country_alter in IP-based Determination of a Visitor's Country 8

Same name and namespace in other branches
  1. 7 tests/ip2country_test.module \ip2country_test_ip2country_alter()

Implements hook_ip2country_alter().

File

tests/modules/ip2country_test/ip2country_test.module, line 21
Determination of user's Country based on IP.

Code

function ip2country_test_ip2country_alter($path, $arg) {
  \Drupal::messenger()
    ->addMessage('hook_ip2country_alter() executed.');

  // @todo Actually do something here!
  // Should have a little testing database of IP addresses,
  // replace the array in ip2country.test,
  // mini DB can be used in place of real DB for testing, plus
  // it validates hook.
}