Skip to content

Commit

Permalink
Issue CollaboraOnline#52: Support for groupmedia 3 and 4.
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronGilMartinez committed Nov 18, 2024
1 parent e20236d commit aea0ba7
Show file tree
Hide file tree
Showing 3 changed files with 1,024 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,17 @@ function collabora_online_group_install(): void {
) {
// Update view with module configuration.
$name = 'views.view.group_media';

// Fallback for older versions.
if (\Drupal::entityTypeManager()->getDefinition('group_relationship_type', FALSE) === NULL) {
$name = 'views.view.group_media-3';
}

$module_path = Drupal::moduleHandler()->getModule('collabora_online_group')->getPath();
$source = new FileStorage($module_path . '/config/override');
/** @var \Drupal\Core\Config\StorageInterface $active_storage */
$active_storage = \Drupal::service('config.storage');
$config = $source->read( $name);
$active_storage->write($name, $config);
$active_storage->write('views.view.group_media', $config);
}
}
Loading

0 comments on commit aea0ba7

Please sign in to comment.