[FEATURE] Add stdWrap for treatIdAsReference property 99/40499/2
authorBenjamin Mack <benni@typo3.org>
Sat, 20 Jun 2015 18:23:17 +0000 (20:23 +0200)
committerBenjamin Mack <benni@typo3.org>
Mon, 22 Jun 2015 10:30:09 +0000 (12:30 +0200)
Resolves: #43984
Releases: master
Change-Id: I9b30eedac9549817cec19fbcc1880252a02f53d3
Reviewed-on: http://review.typo3.org/40499
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Frederic Gaus <frederic.gaus@flagbit.de>
Tested-by: Frederic Gaus <frederic.gaus@flagbit.de>
Reviewed-by: Benjamin Mack <benni@typo3.org>
Tested-by: Benjamin Mack <benni@typo3.org>
typo3/sysext/core/Documentation/Changelog/master/Feature-43984-AddStdWrapFunctionalityToTreatIdAsReferenceTypoScript.rst [new file with mode: 0644]
typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php

diff --git a/typo3/sysext/core/Documentation/Changelog/master/Feature-43984-AddStdWrapFunctionalityToTreatIdAsReferenceTypoScript.rst b/typo3/sysext/core/Documentation/Changelog/master/Feature-43984-AddStdWrapFunctionalityToTreatIdAsReferenceTypoScript.rst
new file mode 100644 (file)
index 0000000..6e7a8d4
--- /dev/null
@@ -0,0 +1,9 @@
+============================================================================
+Feature: #43984 - Add stdWrap functionality to TreatIdAsReference TypoScript
+============================================================================
+
+Description
+===========
+
+The new TypoScript property "treatIdAsReference" for the getImgResource object
+can now be used with stdWrap properties.
index 6460d05..7fca67b 100644 (file)
@@ -5471,7 +5471,8 @@ class ContentObjectRenderer {
                                        }
 
                                        if (MathUtility::canBeInterpretedAsInteger($file)) {
-                                               if (!empty($fileArray['treatIdAsReference'])) {
+                                               $treatIdAsReference = isset($fileArray['treatIdAsReference.']) ? $this->stdWrap($fileArray['treatIdAsReference'], $fileArray['treatIdAsReference.']) : $fileArray['treatIdAsReference'];
+                                               if (!empty($treatIdAsReference)) {
                                                        $fileReference = $this->getResourceFactory()->getFileReferenceObject($file);
                                                        $fileObject = $fileReference->getOriginalFile();
                                                        if (!isset($fileArray['crop'])) {