You are here

public function IpGeoLocGlobal::getFontIconLibs in IP Geolocation Views & Maps 8

Returns an array of libraries as entered on the config page.

File

src/Services/IpGeoLocGlobal.php, line 510

Class

IpGeoLocGlobal
Class IpGeoLocGlobal.

Namespace

Drupal\ip_geoloc\Services

Code

public function getFontIconLibs() {
  $libs = [];
  for ($i = 1; $i <= IP_GEOLOC_MAX_NUM_FONT_ICON_LIBS; $i++) {
    $file = $this->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;
}