File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
public/themes/custom/hdbt_subtheme Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments