You are here

function groupmedia_post_update_group_permissions in Group Media 8.2

Same name and namespace in other branches
  1. 8 groupmedia.post_update.php \groupmedia_post_update_group_permissions()

Change views context to user.group_permissions.

File

./groupmedia.post_update.php, line 11
Post update functions for the embed module.

Code

function groupmedia_post_update_group_permissions() {
  if (\Drupal::moduleHandler()
    ->moduleExists('views')) {
    $view = \Drupal::entityTypeManager()
      ->getStorage('view')
      ->load('group_media');
    if ($view) {

      // Resave the existing view to recalculate cache contexts.
      $view
        ->save();
    }
  }
}