Commit d365a6c8 authored by Gareth Alexander's avatar Gareth Alexander
Browse files

Issue #3170052 by project-update-bot: Adding Drupal 9 compatibility fixes.

parent cdcfa1e1
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -77,7 +77,7 @@ function boldy_preprocess_maintenance_page(&$variables) {
      ),
    ),
  );
  drupal_render($libraries);
  \Drupal::service('renderer')->render($libraries);

  // Set the options that apply to both page and maintenance page.
  _boldy_process_page($variables);
@@ -100,7 +100,7 @@ function boldy_preprocess_node(&$variables) {
    if (!empty($topics)) {
      foreach ($topics as $key => $topic) {
        $topic_name = $variables['node']->field_topics->get($key)->value;
        $topic_links[] = Link::fromTextAndUrl($topic_name, Url::fromUri('internal:/blog/' . Unicode::strtolower($topic_name)))->toString();
        $topic_links[] = Link::fromTextAndUrl($topic_name, Url::fromUri('internal:/blog/' . mb_strtolower($topic_name)))->toString();
      }
    }
  }
@@ -110,7 +110,7 @@ function boldy_preprocess_node(&$variables) {
    if (!empty($topics)) {
      foreach ($topics as $key => $topic) {
        $topic_name = $variables['node']->field_topics->get($key)->value;
        $topic_links[] = Link::fromTextAndUrl($topic_name, Url::fromUri('internal:/portfolio/' . Unicode::strtolower($topic_name)))->toString();
        $topic_links[] = Link::fromTextAndUrl($topic_name, Url::fromUri('internal:/portfolio/' . mb_strtolower($topic_name)))->toString();
      }
    }
  }
@@ -142,7 +142,7 @@ function boldy_preprocess_block(&$variables) {
        else {
          $logo = theme_get_setting('logo');
          if (!empty($logo['path'])) {
            $style = entity_load('image_style', 'logo');
            $style = \Drupal::service('entity_type.manager')->getStorage('image_style')->load('logo');
            $variables['site_logo'] = $style->buildUrl($logo['path']);
          }
        }