You are here

public function ResourceController::getThumbnailWithNoExtension in Drupal 10

Same name and namespace in other branches
  1. 9 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 46

Class

ResourceController
Test controller returning oEmbed resources from Media's test fixtures.

Namespace

Drupal\media_test_oembed\Controller

Code

public function getThumbnailWithNoExtension() {
  $response = new BinaryFileResponse('core/misc/druplicon.png');
  $response->headers
    ->set('Content-Type', 'image/png');
  return $response;
}