legal.install in Legal 8
Same filename and directory in other branches
Installation and update functions for the Legal module.
File
legal.installView source
<?php
/**
* @file
* Installation and update functions for the Legal module.
*/
use Drupal\user\RoleInterface;
/**
* Implements hook_install().
*/
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',
]);
}
}
/**
* Implements hook_update_last_removed().
*/
function legal_update_last_removed() {
return 7103;
}
Functions
Name | Description |
---|---|
legal_install | Implements hook_install(). |
legal_update_last_removed | Implements hook_update_last_removed(). |