diff --git a/core/modules/comment/comment.install b/core/modules/comment/comment.install index f9678a2..9ef2a2c 100644 --- a/core/modules/comment/comment.install +++ b/core/modules/comment/comment.install @@ -39,7 +39,7 @@ function comment_uninstall() { */ function comment_enable() { $comment_fields = comment_get_comment_fields(); - $entity_info = entity_get_info(); + $entity_info = drupal_container()->get('plugin.manager.entity')->getDefinitions(); foreach ($comment_fields as $field_name => $info) { foreach ($info['bundles'] as $entity_type => $bundles) { foreach ($bundles as $bundle) { diff --git a/core/modules/comment/comment.views.inc b/core/modules/comment/comment.views.inc index 35e6cd0..14342b0 100644 --- a/core/modules/comment/comment.views.inc +++ b/core/modules/comment/comment.views.inc @@ -329,7 +329,7 @@ function comment_views_data() { ); // Provide a relationship for each entity type except comment. - foreach (entity_get_info() as $type => $entity_info) { + foreach (drupal_container()->get('plugin.manager.entity')->getDefinitions() as $type => $entity_info) { if ($type == 'comment') { continue; } @@ -346,7 +346,7 @@ function comment_views_data() { 'extra' => array( array( 'field' => 'entity_type', - 'value' => 'node', + 'value' => $type, 'table' => 'comment' ), ), @@ -422,7 +422,7 @@ function comment_views_data() { $data['comment_entity_statistics']['table']['group'] = t('Comment Statistics'); // Provide a relationship for each entity type except comment. - foreach (entity_get_info() as $type => $entity_info) { + foreach (drupal_container()->get('plugin.manager.entity')->getDefinitions() as $type => $entity_info) { if ($type == 'comment') { continue; } @@ -572,7 +572,7 @@ function comment_views_data_alter(&$data) { ); // Provide a integration for each entity type. - foreach (entity_get_info() as $entity_type => $entity_info) { + foreach (drupal_container()->get('plugin.manager.entity')->getDefinitions() as $entity_type => $entity_info) { if (!isset($entity_info['base_table'])) { continue; } diff --git a/core/modules/comment/lib/Drupal/comment/Plugin/views/argument/UserUid.php b/core/modules/comment/lib/Drupal/comment/Plugin/views/argument/UserUid.php index 6b5b73f..6db8987 100644 --- a/core/modules/comment/lib/Drupal/comment/Plugin/views/argument/UserUid.php +++ b/core/modules/comment/lib/Drupal/comment/Plugin/views/argument/UserUid.php @@ -62,7 +62,7 @@ public function query($group_by = FALSE) { // attached to. if ($this->table != 'comment') { $table_info = drupal_container()->get('views.views_data')->get($this->table); - $entity_info = entity_get_info($table_info['table']['entity type']); + $entity_info = drupal_container()->get('plugin.manager.entity')->getDefinitions($table_info['table']['entity type']); $subselect = db_select('comment', 'c'); $subselect->addField('c', 'cid');