Import configuration file programmatically on Drupal 9 using config_update contrib module and service
//Update Module settings
\Drupal::service('config_update.config_update')->revert('system.simple', 'mymodule.settings');
// Import a block.
\Drupal::service('config_update.config_update')->import('block', 'mycustomblock');
Comments