Skip to content

Commit

Permalink
Issue #56: Use MediaInterface as parameter type.
Browse files Browse the repository at this point in the history
  • Loading branch information
donquixote committed Nov 29, 2024
1 parent c637951 commit db416a8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Controller/ViewerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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.
Expand All @@ -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',
];
Expand Down

0 comments on commit db416a8

Please sign in to comment.