function dblog_post_update_add_langcode_to_settings
Ensures the `dblog.settings` config has a langcode.
File
-
core/
modules/ dblog/ dblog.post_update.php, line 11
Code
function dblog_post_update_add_langcode_to_settings() : void {
$config = \Drupal::configFactory()->getEditable('dblog.settings');
if ($config->get('langcode')) {
return;
}
$config->set('langcode', \Drupal::languageManager()->getDefaultLanguage()
->getId())
->save();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.