You are here

function thunder_liveblog_install in Thunder 6.1.x

Same name and namespace in other branches
  1. 8.5 modules/thunder_liveblog/thunder_liveblog.install \thunder_liveblog_install()
  2. 8.2 modules/thunder_liveblog/thunder_liveblog.install \thunder_liveblog_install()
  3. 8.3 modules/thunder_liveblog/thunder_liveblog.install \thunder_liveblog_install()
  4. 8.4 modules/thunder_liveblog/thunder_liveblog.install \thunder_liveblog_install()
  5. 6.2.x modules/thunder_liveblog/thunder_liveblog.install \thunder_liveblog_install()
  6. 6.0.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();
    }
  }
}