function final public static function Bootstrap::initialize

8.x-3.x Bootstrap.php final public static Bootstrap::initialize()

Initializes the active theme.

Class

Bootstrap
The primary class for the Drupal Bootstrap base theme.

Namespace

Drupal\bootstrap

Source src/Bootstrap.php (line 1245)

final public static function initialize() {
  static $initialized = FALSE;
  if (!$initialized) {
    // Initialize the active theme.
    $active_theme = self::getTheme();

    // Include deprecated functions.
    foreach ($active_theme->getAncestry() as $ancestor) {
      if ($ancestor->getSetting('include_deprecated')) {
        $files = $ancestor->fileScan('/^deprecated\.php$/');
        if ($file = reset($files)) {
          $ancestor->includeOnce($file->uri, FALSE);
        }
      }
    }

    $initialized = TRUE;
  }
}