Skip to content

Commit

Permalink
Add updates for LocalGov Microsites Base 1.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ekes committed Sep 25, 2024
1 parent 6c9ff13 commit 0320a3a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"localgovdrupal/localgov_directories": "^3.1",
"localgovdrupal/localgov_events": "^3.0",
"localgovdrupal/localgov_microsites_group": "^4.0",
"localgovdrupal/localgov_microsites_base": "^2.0",
"localgovdrupal/localgov_microsites_base": "^2.0.3",
"localgovdrupal/localgov_microsites_colour_picker_fields": "^1.0.0-beta1",
"localgovdrupal/localgov_news": "^2.3",
"localgovdrupal/localgov_page": "^1.0.0-beta2",
Expand Down
1 change: 1 addition & 0 deletions localgov_microsites.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ install:
- localgov_microsites_group:localgov_microsites_group_webform
- localgov_paragraphs:localgov_paragraphs_views
- localgov_sa11y:localgov_sa11y
- localgov_base:localgov_base_helper

themes:
- localgov_microsites_base
Expand Down
15 changes: 15 additions & 0 deletions localgov_microsites.install
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,18 @@ function localgov_microsites_update_10001() {
$role->save();
}
}

/**
* Update existing sites to enable the theme dependency module for base.
*/
function localgov_microsites_update_10002() {
// The theme dependency should have caused the module to exist, but lets not
// fail if it's not there, as this is just a helper. The theme will continue
// to work when updated later, but report the requirement.
if (\Drupal::service('theme_handler')->themeExists('localgov_base')) {
if (\Drupal::service('module_installer')->install(['localgov_base_helper'])) {
return t('Base theme helper module enabled.');
}
return t('LocalGov Base theme will require the LocalGov Base Helper module. Enable it manually when upgrading to version 1.7.0 or higher. Required by LocalGov Microsites Base 2.0.3');
}
}

0 comments on commit 0320a3a

Please sign in to comment.