You are here

public function Theme::getAncestry in Express 8

Retrieves the full base/sub-theme ancestry of a theme.

Parameters

bool $reverse: Whether or not to return the array of themes in reverse order, where the active theme is the first entry.

Return value

\Drupal\bootstrap\Theme[] An associative array of \Drupal\bootstrap objects (theme), keyed by machine name.

4 calls to Theme::getAncestry()
Theme::getPendingUpdates in themes/contrib/bootstrap/src/Theme.php
Retrieves pending updates for the theme.
Theme::hasGlyphicons in themes/contrib/bootstrap/src/Theme.php
Determines whether or not if the theme has Bootstrap Framework Glyphicons.
Theme::install in themes/contrib/bootstrap/src/Theme.php
Installs a Bootstrap based theme.
Theme::subthemeOf in themes/contrib/bootstrap/src/Theme.php
Determines whether or not a theme is a sub-theme of another.

File

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

Class

Theme
Defines a theme object.

Namespace

Drupal\bootstrap

Code

public function getAncestry($reverse = FALSE) {
  $ancestry = $this->themeHandler
    ->getBaseThemes($this->themes, $this
    ->getName());
  foreach (array_keys($ancestry) as $name) {
    $ancestry[$name] = Bootstrap::getTheme($name, $this->themeHandler);
  }
  $ancestry[$this
    ->getName()] = $this;
  return $reverse ? array_reverse($ancestry) : $ancestry;
}