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 | |
// Import arbitrary config from a variable. | |
// Assumes $data has the data you want to import for this config. | |
$config = \Drupal::service('config.factory')->getEditable('filter.format.basic_html'); | |
$config->setData($data)->save(); | |
// Or, re-import the default config for a module or profile, etc. | |
\Drupal::service('config.installer')->installDefaultConfig('module', 'my_custom_module'); |