From db416a8c88ad1c26d04bf8ff7790ae2fe80132dc Mon Sep 17 00:00:00 2001 From: Andreas Hennings Date: Wed, 27 Nov 2024 11:07:51 +0100 Subject: [PATCH] Issue #56: Use MediaInterface as parameter type. --- src/Controller/ViewerController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Controller/ViewerController.php b/src/Controller/ViewerController.php index 55bfc80f..e1059f83 100644 --- a/src/Controller/ViewerController.php +++ b/src/Controller/ViewerController.php @@ -18,7 +18,7 @@ use Drupal\Core\Controller\ControllerBase; use Drupal\Core\Render\RendererInterface; use Drupal\Core\Utility\Error; -use Drupal\media\Entity\Media; +use Drupal\media\MediaInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; @@ -43,7 +43,7 @@ public function __construct( /** * Returns a raw page for the iframe embed. * - * @param \Drupal\media\Entity\Media $media + * @param \Drupal\media\MediaInterface $media * Media entity. * @param \Symfony\Component\HttpFoundation\Request $request * The incoming request. @@ -54,7 +54,7 @@ public function __construct( * @return \Symfony\Component\HttpFoundation\Response * Response suitable for iframe, without the usual page decorations. */ - public function editor(Media $media, Request $request, $edit = FALSE) { + public function editor(MediaInterface $media, Request $request, $edit = FALSE) { $options = [ 'closebutton' => 'true', ];