diff --git a/core/modules/comment/comment.views.inc b/core/modules/comment/comment.views.inc index f7d32b6..c8827f3 100644 --- a/core/modules/comment/comment.views.inc +++ b/core/modules/comment/comment.views.inc @@ -584,5 +584,5 @@ function comment_views_data_alter(&$data) { * @see \Drupal\views\Plugin\views\row\EntityRow */ function comment_views_plugins_row_alter(&$data) { - unset($data['entity:comment']); + $data['entity:comment']['class'] = 'Drupal\comment\Plugin\views\row\CommentRow'; } diff --git a/core/modules/comment/lib/Drupal/comment/Plugin/views/row/CommentRow.php b/core/modules/comment/lib/Drupal/comment/Plugin/views/row/CommentRow.php index 2b2162c..78efddb 100644 --- a/core/modules/comment/lib/Drupal/comment/Plugin/views/row/CommentRow.php +++ b/core/modules/comment/lib/Drupal/comment/Plugin/views/row/CommentRow.php @@ -2,27 +2,15 @@ /** * @file - * Definition of Drupal\comment\Plugin\views\row\CommentRow. + * Contains \Drupal\comment\Plugin\views\row\CommentRow. */ namespace Drupal\comment\Plugin\views\row; use Drupal\views\Plugin\views\row\EntityRow; -use Drupal\Core\Annotation\Plugin; -use Drupal\Core\Annotation\Translation; /** * Plugin which performs a comment_view on the resulting object. - * - * @Plugin( - * id = "comment", - * module = "comment", - * title = @Translation("Comment"), - * help = @Translation("Display the comment with standard comment view."), - * base = {"comment"}, - * entity_type = "comment", - * type = "normal" - * ) */ class CommentRow extends EntityRow { diff --git a/core/modules/comment/tests/modules/comment_test_views/test_views/views.view.test_comment_user_uid.yml b/core/modules/comment/tests/modules/comment_test_views/test_views/views.view.test_comment_user_uid.yml index dfa4b9c..1aa55ba 100644 --- a/core/modules/comment/tests/modules/comment_test_views/test_views/views.view.test_comment_user_uid.yml +++ b/core/modules/comment/tests/modules/comment_test_views/test_views/views.view.test_comment_user_uid.yml @@ -39,7 +39,7 @@ display: style: type: default row: - type: node + type: entity:node display_plugin: default display_title: Master id: default diff --git a/core/modules/node/lib/Drupal/node/Plugin/views/row/NodeRow.php b/core/modules/node/lib/Drupal/node/Plugin/views/row/NodeRow.php index 8035db4..08e6e21 100644 --- a/core/modules/node/lib/Drupal/node/Plugin/views/row/NodeRow.php +++ b/core/modules/node/lib/Drupal/node/Plugin/views/row/NodeRow.php @@ -2,14 +2,11 @@ /** * @file - * Definition of Drupal\node\Plugin\views\row\NodeRow. + * Contains \Drupal\node\Plugin\views\row\NodeRow. */ namespace Drupal\node\Plugin\views\row; -use Drupal\views\ViewExecutable; -use Drupal\Core\Annotation\Plugin; -use Drupal\Core\Annotation\Translation; use Drupal\views\Plugin\views\row\EntityRow; /** @@ -18,16 +15,6 @@ * Most of the code on this object is in the theme function. * * @ingroup views_row_plugins - * - * @Plugin( - * id = "node", - * module = "node", - * title = @Translation("Content"), - * help = @Translation("Display the content with standard node view."), - * base = {"node"}, - * entity_type = "node", - * type = "normal" - * ) */ class NodeRow extends EntityRow { diff --git a/core/modules/node/node.views.inc b/core/modules/node/node.views.inc index 93b591b..8bb66c1 100644 --- a/core/modules/node/node.views.inc +++ b/core/modules/node/node.views.inc @@ -743,5 +743,5 @@ function node_views_wizard() { * @see \Drupal\views\Plugin\views\row\EntityRow */ function node_views_plugins_row_alter(&$data) { - unset($data['entity:node']); + $data['entity:node']['class'] = 'Drupal\node\Plugin\views\row\NodeRow'; } diff --git a/core/modules/taxonomy/tests/modules/taxonomy_test_views/test_views/views.view.test_taxonomy_node_term_data.yml b/core/modules/taxonomy/tests/modules/taxonomy_test_views/test_views/views.view.test_taxonomy_node_term_data.yml index 01480a3..c50b9a3 100644 --- a/core/modules/taxonomy/tests/modules/taxonomy_test_views/test_views/views.view.test_taxonomy_node_term_data.yml +++ b/core/modules/taxonomy/tests/modules/taxonomy_test_views/test_views/views.view.test_taxonomy_node_term_data.yml @@ -66,7 +66,7 @@ display: style: type: default row: - type: node + type: entity:node display_plugin: default display_title: Master id: default diff --git a/core/modules/user/lib/Drupal/user/Plugin/views/row/UserRow.php b/core/modules/user/lib/Drupal/user/Plugin/views/row/UserRow.php index 0c5fea8..37c49f7 100644 --- a/core/modules/user/lib/Drupal/user/Plugin/views/row/UserRow.php +++ b/core/modules/user/lib/Drupal/user/Plugin/views/row/UserRow.php @@ -2,29 +2,17 @@ /** * @file - * Definition of Drupal\user\Plugin\views\row\UserRow. + * Contains \Drupal\user\Plugin\views\row\UserRow. */ namespace Drupal\user\Plugin\views\row; use Drupal\views\Plugin\views\row\EntityRow; -use Drupal\Core\Annotation\Plugin; -use Drupal\Core\Annotation\Translation; /** * A row plugin which renders a user. * * @ingroup views_row_plugins - * - * @Plugin( - * id = "user", - * module = "user", - * title = @Translation("User"), - * help = @Translation("Display the user with standard user view."), - * base = {"users"}, - * entity_type = "user", - * type = "normal" - * ) */ class UserRow extends EntityRow { diff --git a/core/modules/views/config/views.view.archive.yml b/core/modules/views/config/views.view.archive.yml index 759da68..7d4ac4e 100644 --- a/core/modules/views/config/views.view.archive.yml +++ b/core/modules/views/config/views.view.archive.yml @@ -65,7 +65,7 @@ display: style: type: default row: - type: node + type: entity:node page_1: id: page_1 display_title: Page diff --git a/core/modules/views/config/views.view.frontpage.yml b/core/modules/views/config/views.view.frontpage.yml index 638387c..5c06e70 100644 --- a/core/modules/views/config/views.view.frontpage.yml +++ b/core/modules/views/config/views.view.frontpage.yml @@ -28,7 +28,7 @@ display: style: type: default row: - type: node + type: entity:node options: links: 1 sorts: diff --git a/core/modules/views/config/views.view.taxonomy_term.yml b/core/modules/views/config/views.view.taxonomy_term.yml index e766645..6245ed4 100644 --- a/core/modules/views/config/views.view.taxonomy_term.yml +++ b/core/modules/views/config/views.view.taxonomy_term.yml @@ -80,7 +80,7 @@ display: style: type: default row: - type: node + type: entity:node page_1: id: page_1 display_title: Page diff --git a/core/modules/views/lib/Drupal/views/Plugin/Derivative/ViewsEntityRow.php b/core/modules/views/lib/Drupal/views/Plugin/Derivative/ViewsEntityRow.php index e28bb41..7a0d8df 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/Derivative/ViewsEntityRow.php +++ b/core/modules/views/lib/Drupal/views/Plugin/Derivative/ViewsEntityRow.php @@ -13,6 +13,8 @@ /** * Provides views row plugin definitions for all non-special entity types. * + * @ingroup views_row_plugins + * * @see \Drupal\views\Plugin\views\row\EntityRow */ class ViewsEntityRow implements DerivativeInterface { diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/row/EntityRow.php b/core/modules/views/lib/Drupal/views/Plugin/views/row/EntityRow.php index 770f186..772955c 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/row/EntityRow.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/row/EntityRow.php @@ -112,7 +112,12 @@ protected function buildViewModeOptions() { */ public function summaryTitle() { $options = $this->buildViewModeOptions(); - return check_plain($options[$this->options['view_mode']]); + if (isset($options[$this->options['view_mode']])) { + return check_plain($options[$this->options['view_mode']]); + } + else { + return t('No view mode selected'); + } } /** diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_exposed_admin_ui.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_exposed_admin_ui.yml index 488bcc8..03f9f44 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_exposed_admin_ui.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_exposed_admin_ui.yml @@ -34,7 +34,7 @@ display: style: type: default row: - type: node + type: entity:node options: comments: '0' links: '1' diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_feed_display.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_feed_display.yml index 24f6e2e..f8f4b8d 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_feed_display.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_feed_display.yml @@ -51,7 +51,7 @@ display: build_mode: teaser comments: '0' links: '1' - type: node + type: entity:node sorts: created: field: created diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_filter_groups.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_filter_groups.yml index f04854b..dbde236 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_filter_groups.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_filter_groups.yml @@ -68,7 +68,7 @@ display: style: type: default row: - type: node + type: entity:node display_plugin: default display_title: Master id: default diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_get_attach_displays.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_get_attach_displays.yml index 6ef3aec..81cf076 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_get_attach_displays.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_get_attach_displays.yml @@ -26,7 +26,7 @@ display: style: type: default row: - type: node + type: entity:node options: build_mode: teaser links: '1' diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_mini_pager.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_mini_pager.yml index 2676835..01db0cc 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_mini_pager.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_mini_pager.yml @@ -41,7 +41,7 @@ display: style: type: default row: - type: node + type: entity:node options: build_mode: teaser links: '1' diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_pager_full.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_pager_full.yml index 64204ce..2037929 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_pager_full.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_pager_full.yml @@ -20,7 +20,7 @@ display: style: type: default row: - type: node + type: entity:node display_plugin: default display_title: Master id: default diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_pager_none.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_pager_none.yml index c8a82f6..40efff0 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_pager_none.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_pager_none.yml @@ -16,7 +16,7 @@ display: style: type: default row: - type: node + type: entity:node display_plugin: default display_title: Master id: default diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_pager_some.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_pager_some.yml index 4f112ba..ad92c3e 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_pager_some.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_pager_some.yml @@ -19,7 +19,7 @@ display: style: type: default row: - type: node + type: entity:node display_plugin: default display_title: Master id: default diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_redirect_view.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_redirect_view.yml index 7868325..f1cde44 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_redirect_view.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_redirect_view.yml @@ -26,7 +26,7 @@ display: style: type: default row: - type: node + type: entity:node options: build_mode: teaser links: '1' diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_reset_button.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_reset_button.yml index 9db8998..f704f76 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_reset_button.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_reset_button.yml @@ -34,7 +34,7 @@ display: style: type: default row: - type: node + type: entity:node options: comments: '0' links: '1' diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_store_pager_settings.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_store_pager_settings.yml index 43e6cfd..3f5a983 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_store_pager_settings.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_store_pager_settings.yml @@ -16,7 +16,7 @@ display: style: type: default row: - type: node + type: entity:node display_plugin: default display_title: Master id: default