/** * @var Drupal\Core\Theme\ActiveTheme $theme */ $theme = \Drupal::service('theme.manager')->getActiveTheme(); $name = $theme->getName()