-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathyamapsapi.module
43 lines (38 loc) · 980 Bytes
/
yamapsapi.module
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
/**
* @file
* Contains yamapsapi.module..
*/
use Drupal\Core\Routing\RouteMatchInterface;
/**
* Implements hook_help().
*/
function yamapsapi_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
// Main module help for the yamapsapi module.
case 'help.page.yamapsapi':
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('Yandex Maps API') . '</p>';
return $output;
default:
}
}
/**
* Implements hook_theme().
*/
function yamapsapi_theme($existing, $type, $theme, $path) {
return [
'yamaps' => [
'variables' => array(
'mapid' => 'yamap',
'map_type' => 'yandex#map',
'map_center' => [0,0],
'map_auto_centering' => FALSE, // optionaly, default FALSE
'map_auto_zooming' => FALSE, // optionaly, default FALSE
'map_objects' => NULL, // GeoJSON, optionaly
),
'file' => 'yamapsapi.yamaps.inc',
],
];
}