function ResourceController::getThumbnailWithNoExtension
Same name in other branches
- 9 core/modules/media/tests/modules/media_test_oembed/src/Controller/ResourceController.php \Drupal\media_test_oembed\Controller\ResourceController::getThumbnailWithNoExtension()
- 10 core/modules/media/tests/modules/media_test_oembed/src/Controller/ResourceController.php \Drupal\media_test_oembed\Controller\ResourceController::getThumbnailWithNoExtension()
Returns an example thumbnail file without an extension.
Return value
\Symfony\Component\HttpFoundation\BinaryFileResponse The response.
1 string reference to 'ResourceController::getThumbnailWithNoExtension'
- media_test_oembed.routing.yml in core/
modules/ media/ tests/ modules/ media_test_oembed/ media_test_oembed.routing.yml - core/modules/media/tests/modules/media_test_oembed/media_test_oembed.routing.yml
File
-
core/
modules/ media/ tests/ modules/ media_test_oembed/ src/ Controller/ ResourceController.php, line 48
Class
- ResourceController
- Test controller returning oEmbed resources from Media's test fixtures.
Namespace
Drupal\media_test_oembed\ControllerCode
public function getThumbnailWithNoExtension() {
$response = new BinaryFileResponse('core/misc/druplicon.png');
$response->headers
->set('Content-Type', 'image/png');
return $response;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.