[BUGFIX] Allow FileInterface for ClickEnlarge ViewHelper 35/60435/2
authorBenni Mack <benni@typo3.org>
Wed, 10 Apr 2019 03:14:07 +0000 (05:14 +0200)
committerGeorg Ringer <georg.ringer@gmail.com>
Wed, 10 Apr 2019 11:54:26 +0000 (13:54 +0200)
Although the documentation and the internal
code allows File and FileReference, the functionality
requires a FileReference.

FileInterface is more appropriate and $cObj->imageLinkWrap()
can deal with File and FileReference.

Resolves: #82101
Releases: master, 9.5
Change-Id: I37e4f091fe0598509eef050cb811ad7627f16c21
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/60435
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Steffen Frese <steffenf14@gmail.com>
Tested-by: Jörg Bösche <typo3@joergboesche.de>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Steffen Frese <steffenf14@gmail.com>
Reviewed-by: Jörg Bösche <typo3@joergboesche.de>
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
typo3/sysext/fluid_styled_content/Classes/ViewHelpers/Link/ClickEnlargeViewHelper.php

index 95f9cf2..da5a322 100644 (file)
@@ -15,7 +15,6 @@ namespace TYPO3\CMS\FluidStyledContent\ViewHelpers\Link;
  */
 
 use TYPO3\CMS\Core\Resource\FileInterface;
-use TYPO3\CMS\Core\Resource\FileReference;
 use TYPO3\CMS\Core\TypoScript\TypoScriptService;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
@@ -52,7 +51,7 @@ class ClickEnlargeViewHelper extends AbstractViewHelper
      */
     public function initializeArguments()
     {
-        $this->registerArgument('image', FileReference::class, 'The original image file', true);
+        $this->registerArgument('image', FileInterface::class, 'The original image file', true);
         $this->registerArgument(
             'configuration',
             'mixed',