function social_private_message_install in Open Social 8.8
Same name and namespace in other branches
- 8.9 modules/social_features/social_private_message/social_private_message.install \social_private_message_install()
- 8 modules/social_features/social_private_message/social_private_message.install \social_private_message_install()
- 8.2 modules/social_features/social_private_message/social_private_message.install \social_private_message_install()
- 8.3 modules/social_features/social_private_message/social_private_message.install \social_private_message_install()
- 8.4 modules/social_features/social_private_message/social_private_message.install \social_private_message_install()
- 8.5 modules/social_features/social_private_message/social_private_message.install \social_private_message_install()
- 8.6 modules/social_features/social_private_message/social_private_message.install \social_private_message_install()
- 8.7 modules/social_features/social_private_message/social_private_message.install \social_private_message_install()
- 10.3.x modules/social_features/social_private_message/social_private_message.install \social_private_message_install()
- 10.0.x modules/social_features/social_private_message/social_private_message.install \social_private_message_install()
- 10.1.x modules/social_features/social_private_message/social_private_message.install \social_private_message_install()
- 10.2.x modules/social_features/social_private_message/social_private_message.install \social_private_message_install()
Implements hook_uninstall().
File
- modules/
social_features/ social_private_message/ social_private_message.install, line 14 - The Social Private Message (de)installation file.
Code
function social_private_message_install() {
_social_private_message_set_permissions();
// Disable the email notification provided by private_message.
/** @var \Drupal\Core\Config\Config|\Drupal\Core\Config\ImmutableConfig $config */
\Drupal::getContainer()
->get('config.factory')
->getEditable('private_message.settings')
->set('enable_email_notifications', FALSE)
->set('send_by_default', FALSE)
->save();
// Set module weight.
module_set_weight('social_private_message', 1);
// Alter display configuration of the private message module.
_social_private_message_set_private_message_default_form_settings();
_social_private_message_set_private_message_default_view_settings();
_social_private_message_set_private_message_inbox_view_settings();
_social_private_message_set_private_message_thread_default_view_settings();
}