function ip_geoloc_get_font_icon_libs in IP Geolocation Views & Maps 8
Same name and namespace in other branches
- 7 ip_geoloc.module \ip_geoloc_get_font_icon_libs()
Returns an array of libraries as entered on the config page.
1 call to ip_geoloc_get_font_icon_libs()
- AdminConfigureForm::buildForm in src/
Form/ AdminConfigureForm.php - Form constructor.
File
- ./
ip_geoloc.module, line 764 - IPGV&M is a mapping engine for Views that contain locations of entities and/or visitors. Google Maps, Leaflet and OpenLayers2 maps are all supported and available through this module. Using a number of optional sources IPGV&M also retrieves…
Code
function ip_geoloc_get_font_icon_libs() {
$config = \Drupal::config('ip_geoloc.settings');
$libs = [];
for ($i = 1; $i <= IP_GEOLOC_MAX_NUM_FONT_ICON_LIBS; $i++) {
$file = $config
->get("ip_geoloc_font_icon_lib{$i}");
if (!empty($file)) {
$libs[$i] = $file;
}
}
$known_install = 'sites/all/libraries/font-awesome/css/font-awesome.min.css';
if (empty($libs) && file_exists($known_install)) {
$libs[1] = $known_install;
}
return $libs;
}