Unverified Commit d57f7ebc authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3113053 by hash6, Hardik_Patel_12, longwave, alexpott: Remove...

Issue #3113053 by hash6, Hardik_Patel_12, longwave, alexpott: Remove $baseThemes BC layer from \Drupal\Core\Theme\ActiveTheme
parent fbcb162e
Loading
Loading
Loading
Loading
−39
Changes for core/lib/Drupal/Core/Theme/ActiveTheme.php: 0 added lines, 39 removed lines.
Original line number Diff line number Diff line
@@ -47,17 +47,6 @@ class ActiveTheme {
   */
  protected $owner;

  /**
   * An array of base theme active theme objects keyed by name.
   *
   * @var static[]
   *
   * @deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. Use
   *   $this->baseThemeExtensions instead.
   *
   * @see https://www.drupal.org/node/3019948
   */
  protected $baseThemes;

  /**
   * An array of base theme extension objects keyed by name.
@@ -138,13 +127,6 @@ public function __construct(array $values) {
    $this->libraries = $values['libraries'];
    $this->extension = $values['extension'];
    $this->baseThemeExtensions = $values['base_theme_extensions'];
    if (!empty($values['base_themes']) && empty($this->baseThemeExtensions)) {
      @trigger_error("The 'base_themes' key is deprecated in Drupal 8.7.0  and support for it will be removed in Drupal 9.0.0. Use 'base_theme_extensions' instead. See https://www.drupal.org/node/3019948", E_USER_DEPRECATED);
      foreach ($values['base_themes'] as $base_theme) {
        $this->baseThemeExtensions[$base_theme->getName()] = $base_theme->getExtension();
      }
    }

    $this->regions = $values['regions'];
    $this->librariesOverride = $values['libraries_override'];
    $this->librariesExtend = $values['libraries_extend'];
@@ -219,27 +201,6 @@ public function getStyleSheetsRemove() {
    return $this->styleSheetsRemove;
  }

  /**
   * Returns an array of base theme active theme objects keyed by name.
   *
   * The order starts with the base theme of $this and ends with the root of
   * the dependency chain.
   *
   * @return static[]
   *
   * @deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. Use
   *   \Drupal\Core\Theme\ActiveTheme::getBaseThemeExtensions() instead.
   *
   * @see https://www.drupal.org/node/3019948
   */
  public function getBaseThemes() {
    @trigger_error('\Drupal\Core\Theme\ActiveTheme::getBaseThemes() is deprecated in Drupal 8.7.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\Theme\ActiveTheme::getBaseThemeExtensions() instead. See https://www.drupal.org/node/3019948', E_USER_DEPRECATED);
    /** @var \Drupal\Core\Theme\ThemeInitialization $theme_initialisation */
    $theme_initialisation = \Drupal::service('theme.initialization');
    $base_themes = array_combine(array_keys($this->baseThemeExtensions), array_keys($this->baseThemeExtensions));
    return array_map([$theme_initialisation, 'getActiveThemeByName'], $base_themes);
  }

  /**
   * Returns an array of base theme extension objects keyed by name.
   *
−71

File deleted.