public function RestExport::setContentType

Sets the content type.

Parameters

string $content_type: The content type machine name. E.g. 'json'.

1 call to RestExport::setContentType()
RestExport::initDisplay in drupal/core/modules/rest/lib/Drupal/rest/Plugin/views/display/RestExport.php

File

drupal/core/modules/rest/lib/Drupal/rest/Plugin/views/display/RestExport.php, line 143
Contains \Drupal\rest\Plugin\views\display\RestExport.

Class

RestExport
The plugin that handles Data response callbacks for REST resources.

Namespace

Drupal\rest\Plugin\views\display

Code

public function setContentType($content_type) {
  $this->contentType = $content_type;
}