Skip to content
Snippets Groups Projects

Add a new display type that allows for areas and a more link to the output.

2 files
+ 80
0
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 33
0
 
<?php
 
 
namespace Drupal\views_rest_serializer_extra\Plugin\views\display;
 
 
use Drupal\rest\Plugin\views\display\RestExport;
 
 
/**
 
* The plugin that handles Data response callbacks for REST resources with additional metadata.
 
*
 
* @ingroup views_display_plugins
 
*
 
* @ViewsDisplay(
 
* id = "rest_export_extra",
 
* title = @Translation("REST export extra"),
 
* help = @Translation("Create a REST export resource with additional display level features, like header, empty, and footer areas."),
 
* uses_route = TRUE,
 
* admin = @Translation("REST export extra"),
 
* returns_response = TRUE
 
* )
 
*/
 
class RestExportExtra extends RestExport {
 
 
/**
 
* {@inheritdoc}
 
*/
 
protected $usesMore = TRUE;
 
 
/**
 
* {@inheritdoc}
 
*/
 
protected $usesAreas = TRUE;
 
 
}
Loading