[BUGFIX] Add stdWrap on value property of TEXT 45/26445/3
authorMarkus Klein <klein.t3@mfc-linz.at>
Mon, 16 Dec 2013 09:45:14 +0000 (10:45 +0100)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Sat, 1 Feb 2014 21:44:34 +0000 (22:44 +0100)
As discussed back in 2010, the value property of the TEXT content object
should have stdWrap functionality as well, if the HTML content object
is deprecated.

Today the 6.0 TSref already mentions stdWrap for value and
the HTML cObject has been removed with 6.0 as well.

This fix now finally adds the stdWrap.

Resolves: #54371
Releases: 6.2, 6.1, 6.0
Change-Id: I1b7068b3715bc9f8aa4608d5f746c16b70562f3b
Reviewed-on: https://review.typo3.org/26445
Reviewed-by: Benjamin Mack
Reviewed-by: Chris topher
Tested-by: Chris topher
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
typo3/sysext/frontend/Classes/ContentObject/TextContentObject.php

index 60bba3c..b9a5665 100644 (file)
@@ -42,11 +42,18 @@ class TextContentObject extends \TYPO3\CMS\Frontend\ContentObject\AbstractConten
         * @return string Output
         */
        public function render($conf = array()) {
+               if (!is_array($conf)) {
+                       return '';
+               }
                $content = '';
-               if (is_array($conf) && isset($conf['value'])) {
+               if (isset($conf['value'])) {
                        $content = $conf['value'];
                        unset($conf['value']);
                }
+               if (isset($conf['value.'])) {
+                       $content = $this->cObj->stdWrap($content, $conf['value.']);
+                       unset($conf['value.']);
+               }
                if (count($conf)) {
                        $content = $this->cObj->stdWrap($content, $conf);
                }