Skip to content

Commit 7854213

Browse files
authored
Merge pull request #978 from City-of-Helsinki/UHF-X_journey_planner
UHF-X Journey planner (to main)
2 parents 7c133c4 + d804af9 commit 7854213

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

public/themes/custom/hdbt_subtheme/hdbt_subtheme.theme

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,12 @@ function hdbt_subtheme_preprocess_paragraph__journey_planner(array &$variables):
107107
$variables['media_id'] = 'journey-map';
108108

109109
// Set the privacy policy URL.
110-
/** @var \Drupal\hdbt_cookie_banner\Services\CookieSettings $cookie_settings */
111-
$cookie_settings = \Drupal::service('hdbt_cookie_banner.cookie_settings');
112-
$variables['privacy_policy_url'] = $cookie_settings->getCookieSettingsPageUrl();
110+
if (Drupal::moduleHandler()->moduleExists('hdbt_cookie_banner')) {
111+
$cookie_settings = Drupal::service('hdbt_cookie_banner.cookie_settings');
112+
$variables['privacy_policy_url'] = $cookie_settings->getCookieSettingsPageUrl();
113+
}
114+
// @todo UHF-10862 Remove once the HDBT cookie banner module is in use.
115+
elseif (Drupal::moduleHandler()->moduleExists('helfi_eu_cookie_compliance')) {
116+
$variables['privacy_policy_url'] = helfi_eu_cookie_compliance_get_privacy_policy_url();
117+
}
113118
}

0 commit comments

Comments
 (0)