class DefaultFormatTestController

Same name in other branches
  1. 9 core/modules/system/tests/modules/default_format_test/src/DefaultFormatTestController.php \Drupal\default_format_test\DefaultFormatTestController
  2. 10 core/modules/system/tests/modules/default_format_test/src/DefaultFormatTestController.php \Drupal\default_format_test\DefaultFormatTestController
  3. 11.x core/modules/system/tests/modules/default_format_test/src/DefaultFormatTestController.php \Drupal\default_format_test\DefaultFormatTestController

Hierarchy

Expanded class hierarchy of DefaultFormatTestController

File

core/modules/system/tests/modules/default_format_test/src/DefaultFormatTestController.php, line 8

Namespace

Drupal\default_format_test
View source
class DefaultFormatTestController {
    public function content(Request $request) {
        $format = $request->getRequestFormat();
        return new CacheableResponse('format:' . $format, 200, [
            'Content-Type' => $request->getMimeType($format),
        ]);
    }

}

Members

Title Sort descending Modifiers Object type Summary
DefaultFormatTestController::content public function

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