Skip to content

Commit

Permalink
Settings for media alias display for documents type
Browse files Browse the repository at this point in the history
  • Loading branch information
sharmasahil committed Nov 27, 2024
1 parent 4559f92 commit ba75329
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@
"codemirror/codemirror": "5.65.12",
"jquery/inputmask": "5.0.8",
"jquery/intl-tel-input": "17.0.19",
"progress-tracker/progress-tracker": "2.0.7"
"progress-tracker/progress-tracker": "2.0.7",
"drupal/media_alias_display": "^2.1"
},
"repositories": {
"drupal": {
Expand Down
4 changes: 4 additions & 0 deletions config/install/media_alias_display.settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
_core:
default_config_hash: WYvSMTu0VCW_FhkuJjHuUhmJ9nerYL0JtZrvGJajNig
kill_switch: false
media_bundles: { }
16 changes: 16 additions & 0 deletions modules/tide_media/tide_media.install
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,19 @@ function tide_media_update_10005() {
$config->set('track_enabled_target_entity_types', $result);
$config->save();
}

/**
* Adds media_alias_display settings for document type.
*/
function tide_media_update_10006() {
if (\Drupal::moduleHandler()->moduleExists('media_alias_display') === FALSE) {
\Drupal::service('module_installer')->install(['media_alias_display']);
}

$media_config = \Drupal::service('config.factory')->getEditable('media_alias_display.settings');
if ($media_config ) {
$media_config->set('media_bundles', ['document' => 'document']);
$media_config->save();
}
}

0 comments on commit ba75329

Please sign in to comment.