function thunder_liveblog_install in Thunder 8.2
Same name and namespace in other branches
- 8.5 modules/thunder_liveblog/thunder_liveblog.install \thunder_liveblog_install()
- 8.3 modules/thunder_liveblog/thunder_liveblog.install \thunder_liveblog_install()
- 8.4 modules/thunder_liveblog/thunder_liveblog.install \thunder_liveblog_install()
- 6.2.x modules/thunder_liveblog/thunder_liveblog.install \thunder_liveblog_install()
- 6.0.x modules/thunder_liveblog/thunder_liveblog.install \thunder_liveblog_install()
- 6.1.x modules/thunder_liveblog/thunder_liveblog.install \thunder_liveblog_install()
Implements hook_install().
Configures form and view display of the field_embed_media.
File
- modules/
thunder_liveblog/ thunder_liveblog.install, line 16 - The install file.
Code
function thunder_liveblog_install() {
// Add permissions to thunder users.
$liveblog_permissions = [
'add liveblog_post entity',
'create liveblog content',
'delete any liveblog content',
'delete liveblog revisions',
'delete liveblog_post entity',
'delete own liveblog content',
'edit any liveblog content',
'edit liveblog_post entity',
'edit own liveblog content',
'revert liveblog revisions',
'view liveblog revisions',
];
foreach ([
'editor',
'seo',
] as $role) {
if ($role = Role::load($role)) {
foreach ($liveblog_permissions as $permission) {
$role
->grantPermission($permission);
}
$role
->save();
}
}
}