function RestExport::setMimeType
Same name in other branches
- 8.9.x core/modules/rest/src/Plugin/views/display/RestExport.php \Drupal\rest\Plugin\views\display\RestExport::setMimeType()
- 10 core/modules/rest/src/Plugin/views/display/RestExport.php \Drupal\rest\Plugin\views\display\RestExport::setMimeType()
- 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 203
Class
- RestExport
- The plugin that handles Data response callbacks for REST resources.
Namespace
Drupal\rest\Plugin\views\displayCode
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.