Skip to content

Instantly share code, notes, and snippets.

@pcambra
Created October 18, 2018 07:19
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pcambra/fefed7ebfa14c0a2602bc4cd7688928c to your computer and use it in GitHub Desktop.
Save pcambra/fefed7ebfa14c0a2602bc4cd7688928c to your computer and use it in GitHub Desktop.
Reinstal module configuration for Drupal 8
drush php-eval "\Drupal::service('config.installer')->installDefaultConfig('module', 'module_name');"
@pcambra
Copy link
Author

pcambra commented Feb 14, 2019

$config = file_get_contents($config_path);
$data = Yaml::parse($config);
// Update the stored configuration.
\Drupal::configFactory()->getEditable($configKey)->setData($data)->save(TRUE);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment