Skip to content

Commit

Permalink
Issue CollaboraOnline#52: Override groupmedia view.
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronGilMartinez committed Nov 15, 2024
1 parent b288e26 commit ab66195
Show file tree
Hide file tree
Showing 3 changed files with 1,039 additions and 4 deletions.
22 changes: 22 additions & 0 deletions modules/collabora_online_group/collabora_online_group.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

use Drupal\Core\Config\FileStorage;

/**
* Implements hook_install().
*/
function collabora_online_group_install(): void {
if (
\Drupal::moduleHandler()->moduleExists('views') &&
\Drupal::entityTypeManager()->getStorage('view')->load('group_media')
) {
// Update view with module configuration.
$name = 'views.view.group_media';
$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);
}
}
Loading

0 comments on commit ab66195

Please sign in to comment.