function RestExport::setMimeType

Same name and namespace in other branches
  1. 9 core/modules/rest/src/Plugin/views/display/RestExport.php \Drupal\rest\Plugin\views\display\RestExport::setMimeType()
  2. 10 core/modules/rest/src/Plugin/views/display/RestExport.php \Drupal\rest\Plugin\views\display\RestExport::setMimeType()
  3. 11.x core/modules/rest/src/Plugin/views/display/RestExport.php \Drupal\rest\Plugin\views\display\RestExport::setMimeType()

Sets the request content type.

Parameters

string $mime_type: The response mime type. E.g. 'application/json'.

1 call to RestExport::setMimeType()
RestExport::initDisplay in core/modules/rest/src/Plugin/views/display/RestExport.php
Initializes the display plugin.

File

core/modules/rest/src/Plugin/views/display/RestExport.php, line 221

Class

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

Namespace

Drupal\rest\Plugin\views\display

Code

public function setMimeType($mime_type) {
    $this->mimeType = $mime_type;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.