diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module index 1081ed4c110..8d065eee388 100644 --- a/core/modules/comment/comment.module +++ b/core/modules/comment/comment.module @@ -861,7 +861,7 @@ function comment_links(CommentInterface $comment, EntityInterface $entity, $fiel } // Add translations link for translation-enabled comment bundles. - if (module_exists('content_translation') && content_translation_translate_access($comment)) { + if (\Drupal::moduleHandler()->moduleExists('content_translation') && content_translation_translate_access($comment)) { $links['comment-translations'] = array( 'title' => t('translate'), 'href' => 'comment/' . $comment->id() . '/translations', diff --git a/core/modules/comment/comment.views.inc b/core/modules/comment/comment.views.inc index e72e58727e2..663704bbf55 100644 --- a/core/modules/comment/comment.views.inc +++ b/core/modules/comment/comment.views.inc @@ -141,7 +141,7 @@ function comment_views_data() { ), ); - if (module_exists('language')) { + if (\Drupal::moduleHandler()->moduleExists('language')) { $data['comment']['langcode'] = array( 'title' => t('Language'), 'help' => t('The language the comment is in.'), diff --git a/core/modules/comment/lib/Drupal/comment/Plugin/views/field/StatisticsLastCommentName.php b/core/modules/comment/lib/Drupal/comment/Plugin/views/field/StatisticsLastCommentName.php index 63d881be3cc..69ba9454046 100644 --- a/core/modules/comment/lib/Drupal/comment/Plugin/views/field/StatisticsLastCommentName.php +++ b/core/modules/comment/lib/Drupal/comment/Plugin/views/field/StatisticsLastCommentName.php @@ -38,7 +38,7 @@ class StatisticsLastCommentName extends FieldPluginBase { ) ) ); - $join = drupal_container()->get('plugin.manager.views.join')->createInstance('standard', $definition); + $join = \Drupal::service('plugin.manager.views.join')->createInstance('standard', $definition); // nes_user alias so this can work with the sort handler, below. $this->user_table = $this->query->ensureTable('ces_users', $this->relationship, $join); diff --git a/core/modules/comment/lib/Drupal/comment/Plugin/views/sort/StatisticsLastCommentName.php b/core/modules/comment/lib/Drupal/comment/Plugin/views/sort/StatisticsLastCommentName.php index 41c518f8804..2f5108a876a 100644 --- a/core/modules/comment/lib/Drupal/comment/Plugin/views/sort/StatisticsLastCommentName.php +++ b/core/modules/comment/lib/Drupal/comment/Plugin/views/sort/StatisticsLastCommentName.php @@ -28,7 +28,7 @@ class StatisticsLastCommentName extends SortPluginBase { 'left_table' => 'comment_entity_statistics', 'left_field' => 'last_comment_uid', ); - $join = drupal_container()->get('plugin.manager.views.join')->createInstance('standard', $definition); + $join = \Drupal::service('plugin.manager.views.join')->createInstance('standard', $definition); // @todo this might be safer if we had an ensure_relationship rather than guessing // the table alias. Though if we did that we'd be guessing the relationship name