function _social_comment_upload_set_defaults in Open Social 8
Same name and namespace in other branches
- 8.2 modules/social_features/social_comment_upload/social_comment_upload.install \_social_comment_upload_set_defaults()
Function that sets the default configuration value(s) for this module.
2 calls to _social_comment_upload_set_defaults()
- social_comment_upload_install in modules/
social_features/ social_comment_upload/ social_comment_upload.install - Install the module.
- social_comment_upload_update_8001 in modules/
social_features/ social_comment_upload/ social_comment_upload.install - Set default values for social comment upload access.
File
- modules/
social_features/ social_comment_upload/ social_comment_upload.install, line 25 - Installation file for Social Comment Upload.
Code
function _social_comment_upload_set_defaults() {
// Set allow to true, since that's the case by default.
\Drupal::getContainer()
->get('config.factory')
->getEditable('social_comment_upload.settings')
->set('allow_upload_comments', 1)
->save();
// SM should be able to change the permissions.
user_role_grant_permissions('sitemanager', [
'administer social_comment_upload settings',
]);
}