Commit 35b205bc authored by Project Update Bot's avatar Project Update Bot Committed by Artem Dmitriiev
Browse files

Issue #3298181 by Project Update Bot: Automated Drupal 10 compatibility fixes

parent 47aaad36
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@ name: Styled Google Map
description: Will provide a Geofield field formatter for adding a Styled Google Map
type: module
core: 8.x
core_version_requirement: ^8 || ^9
core_version_requirement: ^8 || ^9 || ^10
package: Field formatters
dependencies:
  - geofield:geofield
+207 −201
Original line number Diff line number Diff line
@@ -92,8 +92,14 @@ function theme_styled_google_map(array $variables) {
  if (!empty($location) && $location['geohash']) {
    // Get the pin file url.
    if (isset($settings['style']['pin']) && !empty($settings['style']['pin'])) {
      if (\Drupal::hasService('file_url_generator')) {
        $settings['style']['pin'] = \Drupal::service('file_url_generator')
          ->generateAbsoluteString($settings['style']['pin']);
      }
      elseif (function_exists('file_create_url')) {
        $settings['style']['pin'] = file_create_url($settings['style']['pin']);
      }
    }
    // Sanitize the output of the style settings.
    foreach ($settings['style'] as $id => $setting) {
      if ($id != 'style') {
@@ -119,7 +125,7 @@ function theme_styled_google_map(array $variables) {
        default:
          $popup_field = array();
      }
      $location['popup'] = render($popup_field);
      $location['popup'] = \Drupal::service('renderer')->render($popup_field);
    }
    else {
      // Not an entity object.
@@ -151,7 +157,7 @@ function theme_styled_google_map(array $variables) {
    $output['#attached']['library'][] = 'styled_google_map/styled-google-map';
  }

  return render($output);
  return \Drupal::service('renderer')->render($output);
}

/**