function legal_install in Legal 8
Same name and namespace in other branches
- 5 legal.install \legal_install()
- 6.8 legal.install \legal_install()
- 6.7 legal.install \legal_install()
- 2.0.x legal.install \legal_install()
Implements hook_install().
File
- ./
legal.install, line 13 - Installation and update functions for the Legal module.
Code
function legal_install() {
// Set 'view Terms and Conditions' permission to enabled by default.
if (\Drupal::moduleHandler()
->moduleExists('user')) {
user_role_grant_permissions(RoleInterface::ANONYMOUS_ID, [
'view Terms and Conditions',
]);
user_role_grant_permissions(RoleInterface::AUTHENTICATED_ID, [
'view Terms and Conditions',
]);
}
}