Skip to content

Add updates for LocalGov Microsites Base 1.7.0 #487

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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');
}
}
Loading