X-Git-Url: https://yaffs.net/gitweb/?a=blobdiff_plain;ds=inline;f=web%2Fcore%2Fmodules%2Fcomment%2Fsrc%2FCommentViewsData.php;h=7fb74217c4c58b9683f8d3316c80c169e71e82bf;hb=1c1cb0980bfa6caf0c24cce671b6bb541dc87583;hp=52af015d59cae94a8cc6851b898e1366cc5dafe1;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;p=yaffs-website diff --git a/web/core/modules/comment/src/CommentViewsData.php b/web/core/modules/comment/src/CommentViewsData.php index 52af015d5..7fb74217c 100644 --- a/web/core/modules/comment/src/CommentViewsData.php +++ b/web/core/modules/comment/src/CommentViewsData.php @@ -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) {