<?php

/**
 * Implementation of hook_gmap_markerfiles_info().
 *
 * We just scan the directory set in the the 'gmap_markerfiles' variable.
 */
function mkbh_gmap_gmap_markerfiles_info()
{
    return file_scan_directory(drupal_get_path('module', 'mkbh_gmap') . '/markers', '/.*\.ini$/');
}

/**
 * Implements hook_views_pre_render
 *
 * @param $view
 */
function mkbh_gmap_views_pre_render(&$view)
{
    if ($view->name == 'front_page_kbh_kortet') {
        drupal_add_js(drupal_get_path('module', 'mkbh_gmap') . '/inc/js/mkbh_gmap.js', ['scope' => 'footer', 'weight' => 5]);
    }
}
