social_comment_upload.install in Open Social 8
Same filename and directory in other branches
- 8.9 modules/social_features/social_comment_upload/social_comment_upload.install
- 8.2 modules/social_features/social_comment_upload/social_comment_upload.install
- 8.3 modules/social_features/social_comment_upload/social_comment_upload.install
- 8.4 modules/social_features/social_comment_upload/social_comment_upload.install
- 8.5 modules/social_features/social_comment_upload/social_comment_upload.install
- 8.6 modules/social_features/social_comment_upload/social_comment_upload.install
- 8.7 modules/social_features/social_comment_upload/social_comment_upload.install
- 8.8 modules/social_features/social_comment_upload/social_comment_upload.install
- 10.3.x modules/social_features/social_comment_upload/social_comment_upload.install
- 10.0.x modules/social_features/social_comment_upload/social_comment_upload.install
- 10.1.x modules/social_features/social_comment_upload/social_comment_upload.install
- 10.2.x modules/social_features/social_comment_upload/social_comment_upload.install
Installation file for Social Comment Upload.
File
modules/social_features/social_comment_upload/social_comment_upload.installView source
<?php
/**
* @file
* Installation file for Social Comment Upload.
*/
/**
* Install the module.
*/
function social_comment_upload_install() {
_social_comment_upload_set_defaults();
}
/**
* Set default values for social comment upload access.
*/
function social_comment_upload_update_8001() {
_social_comment_upload_set_defaults();
}
/**
* Function that sets the default configuration value(s) for this module.
*/
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',
]);
}
Functions
Name![]() |
Description |
---|---|
social_comment_upload_install | Install the module. |
social_comment_upload_update_8001 | Set default values for social comment upload access. |
_social_comment_upload_set_defaults | Function that sets the default configuration value(s) for this module. |