function public function Theme::hasGlyphicons

8.x-3.x Theme.php public Theme::hasGlyphicons()

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

Class

Theme
Defines a theme object.

Namespace

Drupal\bootstrap

Source src/Theme.php (line 628)

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);
}