drupal 8 import config programmatically
This file contains 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 | |
// The following snippet updates the filter format configuration. | |
$config_path = drupal_get_path('module', 'my_custom_module') . '/config/install'; // or any path containing config files theoretically. | |
$source = new FileStorage($config_path); | |
$config_storage = \Drupal::service('config.storage'); | |
$config_storage->write('filter.format.basic_html', $source->read('filter.format.basic_html')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment