You are here

function geolocation_test_views_install in Geolocation Field 8.2

Same name and namespace in other branches
  1. 8.3 tests/modules/geolocation_test_views/geolocation_test_views.install \geolocation_test_views_install()
  2. 8 tests/modules/geolocation_test_views/geolocation_test_views.install \geolocation_test_views_install()

Implements hook_install().

File

tests/modules/geolocation_test_views/geolocation_test_views.install, line 11
Geolocation test setup.

Code

function geolocation_test_views_install() {

  /** @var \Drupal\Core\Config\Config $config */
  $config = \Drupal::service('config.factory')
    ->getEditable('geolocation_google_maps.settings');
  if (empty($config
    ->get('google_map_api_key'))) {
    $config
      ->set('google_map_api_key', 'AIzaSyAONtEXbk-RsRwS7GA98EJqaGDSnzS70oU')
      ->save();
  }
}