Commit 7b9974f5 authored by webchick's avatar webchick

Issue #2014013 by kgoel | DmitryDrozdik: Replace drupal_container() with...

Issue #2014013 by kgoel | DmitryDrozdik: Replace drupal_container() with Drupal::service() in the statistics module.
parent f5cc5ac7
......@@ -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);
......
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment