You are here

function ip_geoloc_theme in IP Geolocation Views & Maps 8

Same name and namespace in other branches
  1. 7 theme/ip_geoloc_theme.inc \ip_geoloc_theme()

Theming function.

File

./ip_geoloc_theme.inc, line 29
Implements hook_theme().

Code

function ip_geoloc_theme($existing_themes, $type, $theme, $path) {
  $theme = [];
  $theme['ip_geoloc_visitor_map'] = [
    // Located at templates/ip_geoloc_map_multi_visitor.tpl.php.
    'template' => 'ip_geoloc_map_multi_visitor',
    'path' => $path . '/templates',
    'variables' => [
      'locations' => NULL,
      'div_id' => NULL,
      'map_options' => NULL,
      'map_style' => NULL,
    ],
  ];
  $theme['ip_geoloc_map_current_visitor'] = [
    // Located at templates/ip-geoloc-map-current-visitor.html.twig.
    // 'template' => 'ip_geoloc_map_current_visitor',.
    'path' => $path . '/templates',
    'variables' => [
      'ip_geoloc_settings' => [],
    ],
  ];
  $theme['ip_geoloc_map'] = [
    // Located at templates/ip-geoloc-map-current-visitor.html.twig.
    // 'template' => 'ip_geoloc_map_current_visitor',.
    'path' => $path . '/templates',
    'variables' => [
      'ip_geoloc_output_map_multi_location' => '',
    ],
  ];
  $theme['ip_geoloc_leaflet'] = [
    // Located at templates/ip-geoloc-map-current-visitor.html.twig.
    // 'template' => 'ip_geoloc_map_current_visitor',.
    'path' => $path . '/templates',
    'variables' => [
      'map_id' => '',
      'marker_set' => '',
      'style' => '',
    ],
  ];
  return $theme;
}