From 7b9974f56bedbde1301dde8830b4704c9ae709c9 Mon Sep 17 00:00:00 2001
From: webchick <webchick@24967.no-reply.drupal.org>
Date: Mon, 17 Jun 2013 01:17:42 -0500
Subject: [PATCH] Issue #2014013 by kgoel | DmitryDrozdik: Replace
 drupal_container() with Drupal::service() in the statistics module.

---
 .../statistics/lib/Drupal/statistics/StatisticsSettingsForm.php | 2 +-
 core/modules/statistics/statistics.module                       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/core/modules/statistics/lib/Drupal/statistics/StatisticsSettingsForm.php b/core/modules/statistics/lib/Drupal/statistics/StatisticsSettingsForm.php
index d5d16c0362e0..d1bb1c4b41f4 100644
--- a/core/modules/statistics/lib/Drupal/statistics/StatisticsSettingsForm.php
+++ b/core/modules/statistics/lib/Drupal/statistics/StatisticsSettingsForm.php
@@ -85,7 +85,7 @@ public function submitForm(array &$form, array &$form_state) {
     // The popular statistics block is dependent on these settings, so clear the
     // block plugin definitions cache.
     if ($this->moduleHandler->moduleExists('block')) {
-      drupal_container()->get('plugin.manager.block')->clearCachedDefinitions();
+      \Drupal::service('plugin.manager.block')->clearCachedDefinitions();
     }
 
     parent::submitForm($form, $form_state);
diff --git a/core/modules/statistics/statistics.module b/core/modules/statistics/statistics.module
index c9b5a3fbfd19..0c4580cee5fb 100644
--- a/core/modules/statistics/statistics.module
+++ b/core/modules/statistics/statistics.module
@@ -174,7 +174,7 @@ function statistics_get($nid) {
  *   A string as a link, truncated to the width, linked to the given $path.
  */
 function _statistics_link($path, $width = 35) {
-  $title = drupal_container()->get('path.alias_manager')->getPathAlias($path);
+  $title = Drupal::service('path.alias_manager')->getPathAlias($path);
   $title = truncate_utf8($title, $width, FALSE, TRUE);
   return l($title, $path);
 }
-- 
GitLab