You are here

public static function ConfigHelper::forTheme in Lightning Core 8.5

Same name and namespace in other branches
  1. 8 src/ConfigHelper.php \Drupal\lightning_core\ConfigHelper::forTheme()
  2. 8.2 src/ConfigHelper.php \Drupal\lightning_core\ConfigHelper::forTheme()
  3. 8.3 src/ConfigHelper.php \Drupal\lightning_core\ConfigHelper::forTheme()
  4. 8.4 src/ConfigHelper.php \Drupal\lightning_core\ConfigHelper::forTheme()

Creates a new ConfigHelper for a theme.

Parameters

string $theme: The theme name.

Return value

static A new ConfigHelper object.

File

src/ConfigHelper.php, line 212

Class

ConfigHelper
A facade to assist with manipulating default config.

Namespace

Drupal\lightning_core

Code

public static function forTheme($theme) {
  return new static(\Drupal::service('theme_handler')
    ->getTheme($theme), \Drupal::configFactory(), \Drupal::entityTypeManager());
}