class DefaultFormatTestController in Drupal 8
Same name and namespace in other branches
- 9 core/modules/system/tests/modules/default_format_test/src/DefaultFormatTestController.php \Drupal\default_format_test\DefaultFormatTestController
Hierarchy
- class \Drupal\default_format_test\DefaultFormatTestController
Expanded class hierarchy of DefaultFormatTestController
File
- core/
modules/ system/ tests/ modules/ default_format_test/ src/ DefaultFormatTestController.php, line 8
Namespace
Drupal\default_format_testView source
class DefaultFormatTestController {
public function content(Request $request) {
$format = $request
->getRequestFormat();
return new CacheableResponse('format:' . $format, 200, [
'Content-Type' => $request
->getMimeType($format),
]);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DefaultFormatTestController:: |
public | function |