You are here

public function Theme::hasGlyphicons in Express 8

Determines whether or not if the theme has Bootstrap Framework Glyphicons.

File

themes/contrib/bootstrap/src/Theme.php, line 625
Contains \Drupal\bootstrap.

Class

Theme
Defines a theme object.

Namespace

Drupal\bootstrap

Code

public function hasGlyphicons() {
  $glyphicons = $this
    ->getCache('glyphicons');
  if (!$glyphicons
    ->has($this
    ->getName())) {
    $exists = FALSE;
    foreach ($this
      ->getAncestry(TRUE) as $ancestor) {
      if ($ancestor
        ->getSetting('cdn_provider') || $ancestor
        ->fileScan('/glyphicons-halflings-regular\\.(eot|svg|ttf|woff)$/', NULL, [
        'ignore_flags' => FALSE,
      ])) {
        $exists = TRUE;
        break;
      }
    }
    $glyphicons
      ->set($this
      ->getName(), $exists);
  }
  return $glyphicons
    ->get($this
    ->getName(), FALSE);
}