diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/display/RestExport.php b/core/modules/views/lib/Drupal/views/Plugin/views/display/RestExport.php index bcf4775..7185acf 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/display/RestExport.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/display/RestExport.php @@ -2,7 +2,7 @@ /** * @file - * Contains \Drupal\views\Plugin\views\display\WSEndpoint. + * Contains \Drupal\views\Plugin\views\display\RestExport. */ namespace Drupal\views\Plugin\views\display; @@ -13,20 +13,20 @@ use Drupal\views\ViewExecutable; /** - * The plugin that handles Data response callbacks for web service endpoints. + * The plugin that handles Data response callbacks for REST resources. * * @ingroup views_display_plugins * * @Plugin( - * id = "ws_endpoint", + * id = "rest_export", * module = "views", - * title = @Translation("Web service endpoint"), - * help = @Translation("Create a web service endpoint for views data."), + * title = @Translation("REST export"), + * help = @Translation("Create a REST export resource."), * uses_hook_menu = TRUE, - * admin = @Translation("Web service endpoint") + * admin = @Translation("REST export") * ) */ -class WSEndpoint extends PathPluginBase { +class RestExport extends PathPluginBase { /** * Overrides \Drupal\views\Plugin\views\display\DisplayPluginBase::$usesAJAX. @@ -85,7 +85,7 @@ public function initDisplay(ViewExecutable $view, array &$display, array &$optio * Overrides \Drupal\views\Plugin\views\display\DisplayPluginBase::getStyleType(). */ protected function getStyleType() { - return 'ws_endpoint'; + return 'data'; } /** @@ -153,7 +153,7 @@ protected function defineOptions() { // Set the default style plugin to 'json'. $options['style']['contains']['type']['default'] = 'serializer'; - $options['row']['contains']['type']['default'] = 'ws_endpoint_entity'; + $options['row']['contains']['type']['default'] = 'data_entity'; $options['defaults']['default']['style'] = FALSE; $options['defaults']['default']['row'] = FALSE; diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/row/DataEntityRow.php b/core/modules/views/lib/Drupal/views/Plugin/views/row/DataEntityRow.php index 1c9755b..dd520d5 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/row/DataEntityRow.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/row/DataEntityRow.php @@ -17,11 +17,11 @@ * @ingroup views_row_plugins * * @Plugin( - * id = "ws_endpoint_entity", + * id = "data_entity", * module = "views", * title = @Translation("Entity"), * help = @Translation("Use entities as row data."), - * type = "ws_endpoint" + * type = "data" * ) */ class DataEntityRow extends RowPluginBase { diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/row/DataFieldRow.php b/core/modules/views/lib/Drupal/views/Plugin/views/row/DataFieldRow.php index 3c98c27..fa04a17 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/row/DataFieldRow.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/row/DataFieldRow.php @@ -18,11 +18,11 @@ * @ingroup views_row_plugins * * @Plugin( - * id = "ws_endpoint_field", + * id = "data_field", * module = "views", * title = @Translation("Fields"), * help = @Translation("Use fields as row data."), - * type = "ws_endpoint" + * type = "data" * ) */ class DataFieldRow extends RowPluginBase { diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/style/Serializer.php b/core/modules/views/lib/Drupal/views/Plugin/views/style/Serializer.php index 23d9c73..01dd596 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/style/Serializer.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/style/Serializer.php @@ -22,7 +22,7 @@ * module = "views", * title = @Translation("Serializer"), * help = @Translation("Serializes views row data using the Serializer component."), - * type = "ws_endpoint" + * type = "data" * ) */ class Serializer extends StylePluginBase { diff --git a/core/modules/views/lib/Drupal/views/Tests/Plugin/StyleSerializeTest.php b/core/modules/views/lib/Drupal/views/Tests/Plugin/StyleSerializeTest.php index c53bfcb..9a987d2 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Plugin/StyleSerializeTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Plugin/StyleSerializeTest.php @@ -90,7 +90,7 @@ public function testSerializerResponses() { // Test that the rendered output and the preview output are the same. $view->destroy(); - $view->setDisplay('ws_endpoint_1'); + $view->setDisplay('rest_export_1'); // Mock the request content type by setting it on the display handler. $view->display_handler->setContentType('json'); $this->assertIdentical($actual_json, $view->preview(), 'The expected JSON preview output was found.'); @@ -136,8 +136,8 @@ public function testUIFieldAlias() { $this->drupalLogin($this->adminUser); // Test the UI settings for adding field ID aliases. - $this->drupalGet('admin/structure/views/view/test_serialize_display_field/edit/ws_endpoint_1'); - $row_options = 'admin/structure/views/nojs/display/test_serialize_display_field/ws_endpoint_1/row_options'; + $this->drupalGet('admin/structure/views/view/test_serialize_display_field/edit/rest_export_1'); + $row_options = 'admin/structure/views/nojs/display/test_serialize_display_field/rest_export_1/row_options'; $this->assertLinkByHref($row_options); // Test an empty string for an alias, this should not be used. This also @@ -146,7 +146,7 @@ public function testUIFieldAlias() { $this->drupalPost(NULL, array(), t('Save')); $view = views_get_view('test_serialize_display_field'); - $view->setDisplay('ws_endpoint_1'); + $view->setDisplay('rest_export_1'); $this->executeView($view); $expected = array(); diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_serialize_display_entity.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_serialize_display_entity.yml index fe03987..f19dc79 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_serialize_display_entity.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_serialize_display_entity.yml @@ -25,7 +25,7 @@ display: style: type: serializer row: - type: ws_endpoint_entity + type: data_entity sorts: id: id: standard @@ -34,9 +34,9 @@ display: order: DESC title: 'Test serialize' arguments: { } - ws_endpoint_1: - display_plugin: ws_endpoint - id: ws_endpoint_1 + rest_export_1: + display_plugin: rest_export + id: rest_export_1 display_title: serializer position: '' display_options: diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_serialize_display_field.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_serialize_display_field.yml index 5cafeb4..3329f8e 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_serialize_display_field.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_serialize_display_field.yml @@ -25,7 +25,7 @@ display: style: type: serializer row: - type: ws_endpoint_field + type: data_field fields: name: id: name @@ -52,9 +52,9 @@ display: order: DESC title: 'Test serialize' arguments: { } - ws_endpoint_1: - display_plugin: ws_endpoint - id: ws_endpoint_1 + rest_export_1: + display_plugin: rest_export + id: rest_export_1 display_title: serializer position: '' display_options: @@ -68,10 +68,10 @@ display: style: type: serializer row: - type: ws_endpoint_field - ws_endpoint_2: - display_plugin: ws_endpoint - id: ws_endpoint_2 + type: data_field + rest_export_2: + display_plugin: rest_export + id: rest_export_2 display_title: 'serialize - access denied' position: '' display_options: @@ -87,7 +87,7 @@ display: style: type: serializer row: - type: ws_endpoint_field + type: data_field base_field: id disabled: '0' module: views