function RestExport::setContentType
Same name in other branches
- 9 core/modules/rest/src/Plugin/views/display/RestExport.php \Drupal\rest\Plugin\views\display\RestExport::setContentType()
- 8.9.x core/modules/rest/src/Plugin/views/display/RestExport.php \Drupal\rest\Plugin\views\display\RestExport::setContentType()
- 10 core/modules/rest/src/Plugin/views/display/RestExport.php \Drupal\rest\Plugin\views\display\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 core/
modules/ rest/ src/ Plugin/ views/ display/ RestExport.php - Initializes the display plugin.
File
-
core/
modules/ rest/ src/ Plugin/ views/ display/ RestExport.php, line 228
Class
- RestExport
- The plugin that handles Data response callbacks for REST resources.
Namespace
Drupal\rest\Plugin\views\displayCode
public function setContentType($content_type) {
$this->contentType = $content_type;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.