You are here

public function ExtraLinks::installedThemes in Admin Toolbar 8.2

Same name and namespace in other branches
  1. 3.x admin_toolbar_tools/src/Plugin/Derivative/ExtraLinks.php \Drupal\admin_toolbar_tools\Plugin\Derivative\ExtraLinks::installedThemes()

Lists all installed themes.

Return value

array The list of installed themes.

1 call to ExtraLinks::installedThemes()
ExtraLinks::getDerivativeDefinitions in admin_toolbar_tools/src/Plugin/Derivative/ExtraLinks.php
Gets the definition of all derivatives of a base plugin.

File

admin_toolbar_tools/src/Plugin/Derivative/ExtraLinks.php, line 669

Class

ExtraLinks
Provides a default implementation for menu link plugins.

Namespace

Drupal\admin_toolbar_tools\Plugin\Derivative

Code

public function installedThemes() {
  $themeHandler = $this->themeHandler;
  $all_themes = $themeHandler
    ->listInfo();
  $themes_installed = [];
  foreach ($all_themes as $key_theme => $theme) {
    if ($themeHandler
      ->hasUi($key_theme)) {
      $themes_installed[$key_theme] = $themeHandler
        ->getName($key_theme);
    }
  }
  return $themes_installed;
}