You are here

public static function ConfigHelper::forModule in Lightning Core 8.4

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

Creates a new ConfigHelper for a module.

Parameters

string $module: The module name.

Return value

static A new ConfigHelper object.

File

src/ConfigHelper.php, line 195

Class

ConfigHelper
A facade to assist with manipulating default config.

Namespace

Drupal\lightning_core

Code

public static function forModule($module) {
  return new static(\Drupal::moduleHandler()
    ->getModule($module), \Drupal::configFactory(), \Drupal::entityTypeManager());
}