function social_core_update_8905 in Open Social 10.1.x
Same name and namespace in other branches
- 10.3.x modules/social_features/social_core/social_core.install \social_core_update_8905()
- 10.0.x modules/social_features/social_core/social_core.install \social_core_update_8905()
- 10.2.x modules/social_features/social_core/social_core.install \social_core_update_8905()
Sets the Content Entity Forms to Open Social style.
File
- modules/
social_features/ social_core/ social_core.install, line 1267 - Install, update and uninstall functions for the social_core module.
Code
function social_core_update_8905() {
// Only when socialblue is default we set this.
if (\Drupal::service('theme.manager')
->getActiveTheme()
->getName() === 'socialblue') {
try {
// Sets it to Open Social.
$config = \Drupal::configFactory()
->getEditable('socialblue.settings');
$config
->set('content_entity_form_style', 'open_social')
->save();
} catch (Exception $e) {
\Drupal::logger('social_core')
->error('Could not install Content Entity forms as Open Social please do so manually in the Socialblue settings.');
}
}
}