geolocation_yandex.module in Geolocation Field 8.2
Same filename and directory in other branches
Yandex Maps hooks.
File
modules/geolocation_yandex/geolocation_yandex.moduleView source
<?php
/**
* @file
* Yandex Maps hooks.
*/
/**
* Implements hook_library_info_build().
*/
function geolocation_yandex_library_info_build() {
$config = \Drupal::config('yandex_maps.settings');
$api_key = $config
->get('key');
$lang = \Drupal::languageManager()
->getCurrentLanguage();
$libraries = [];
$libraries['yandex_maps'] = [
'version' => '1.x',
'js' => [
'https://api-maps.yandex.ru/2.1/?apikey=' . $api_key . '&lang=' . $lang
->getId() => [
'type' => 'external',
],
],
];
return $libraries;
}
Functions
Name | Description |
---|---|
geolocation_yandex_library_info_build | Implements hook_library_info_build(). |