Skip to content

Commit

Permalink
Merge pull request #978 from City-of-Helsinki/UHF-X_journey_planner
Browse files Browse the repository at this point in the history
UHF-X Journey planner (to main)
  • Loading branch information
khalima authored Nov 22, 2024
2 parents 7c133c4 + d804af9 commit 7854213
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions public/themes/custom/hdbt_subtheme/hdbt_subtheme.theme
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,12 @@ function hdbt_subtheme_preprocess_paragraph__journey_planner(array &$variables):
$variables['media_id'] = 'journey-map';

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

0 comments on commit 7854213

Please sign in to comment.