Created
January 4, 2019 19:05
-
-
Save kerasai/654d9600002267bf0238b9119b214917 to your computer and use it in GitHub Desktop.
Install configuration from YML
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** @var \Drupal\Core\Config\StorageInterface $config_storage */ | |
$config_storage = \Drupal::service('config.storage'); | |
$path = drupal_get_path('module', 'module_name') . '/config/install'; | |
$file_storage = new \Drupal\Core\Config\FileStorage($path); | |
$id = 'full.config.identifier'; | |
$config_storage->write($id, $file_storage->read($id)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment