Further Drupal 8.6.4 changes. Some core files were not committed before a commit...
[yaffs-website] / web / core / modules / comment / src / CommentViewsData.php
index 52af015d59cae94a8cc6851b898e1366cc5dafe1..7fb74217c4c58b9683f8d3316c80c169e71e82bf 100644 (file)
@@ -23,6 +23,7 @@ class CommentViewsData extends EntityViewsData {
 
     $data['comment_field_data']['subject']['title'] = $this->t('Title');
     $data['comment_field_data']['subject']['help'] = $this->t('The title of the comment.');
+    $data['comment_field_data']['subject']['field']['default_formatter'] = 'comment_permalink';
 
     $data['comment_field_data']['name']['title'] = $this->t('Author');
     $data['comment_field_data']['name']['help'] = $this->t("The name of the comment's author. Can be rendered as a link to the author's homepage.");
@@ -168,6 +169,17 @@ class CommentViewsData extends EntityViewsData {
       ],
     ];
 
+    $data['comment_field_data']['entity_id']['field']['id'] = 'commented_entity';
+    unset($data['comment_field_data']['entity_id']['relationship']);
+
+    $data['comment']['comment_bulk_form'] = [
+      'title' => $this->t('Comment operations bulk form'),
+      'help' => $this->t('Add a form element that lets you run operations on multiple comments.'),
+      'field' => [
+        'id' => 'comment_bulk_form',
+      ],
+    ];
+
     $data['comment_field_data']['thread']['field'] = [
       'title' => $this->t('Depth'),
       'help' => $this->t('Display the depth of the comment if it is threaded.'),
@@ -202,7 +214,7 @@ class CommentViewsData extends EntityViewsData {
               [
                 'field' => 'entity_type',
                 'value' => $type,
-                'table' => 'comment_field_data'
+                'table' => 'comment_field_data',
               ],
             ],
           ],
@@ -223,7 +235,7 @@ class CommentViewsData extends EntityViewsData {
 
     // Define the base group of this table. Fields that don't have a group defined
     // will go into this field by default.
-    $data['comment_entity_statistics']['table']['group']  = $this->t('Comment Statistics');
+    $data['comment_entity_statistics']['table']['group'] = $this->t('Comment Statistics');
 
     // Provide a relationship for each entity type except comment.
     foreach ($entities_types as $type => $entity_type) {