function social_user_update_8004 in Open Social 10.2.x
Same name and namespace in other branches
- 8.9 modules/social_features/social_user/social_user.install \social_user_update_8004()
- 8 modules/social_features/social_user/social_user.install \social_user_update_8004()
- 8.2 modules/social_features/social_user/social_user.install \social_user_update_8004()
- 8.3 modules/social_features/social_user/social_user.install \social_user_update_8004()
- 8.4 modules/social_features/social_user/social_user.install \social_user_update_8004()
- 8.5 modules/social_features/social_user/social_user.install \social_user_update_8004()
- 8.6 modules/social_features/social_user/social_user.install \social_user_update_8004()
- 8.7 modules/social_features/social_user/social_user.install \social_user_update_8004()
- 8.8 modules/social_features/social_user/social_user.install \social_user_update_8004()
- 10.3.x modules/social_features/social_user/social_user.install \social_user_update_8004()
- 10.0.x modules/social_features/social_user/social_user.install \social_user_update_8004()
- 10.1.x modules/social_features/social_user/social_user.install \social_user_update_8004()
Migrate navigation settings into the correct format.
File
- modules/
social_features/ social_user/ social_user.install, line 62 - Install, update and uninstall functions for the social_user module.
Code
function social_user_update_8004() {
$old_config = \Drupal::getContainer()
->get('config.factory')
->getEditable('social_user_navigation.settings');
$new_config = \Drupal::getContainer()
->get('config.factory')
->getEditable('social_user.navigation.settings');
// Store the values.
$new_config
->setData($old_config
->getRawData());
// Remove the old config altogether.
$old_config
->delete();
}