[TASK] Add missing tslib_content_abstract::getContentObject()
authorRens <rens.admiraal@typo3.org>
Mon, 17 Oct 2011 09:15:39 +0000 (11:15 +0200)
committerGeorg Ringer <mail@ringerge.org>
Thu, 3 Nov 2011 07:12:42 +0000 (08:12 +0100)
Without this getter method there's no clean way to access the current
tslib_cObj object from a custom media renderer for example.

Resolves: #30994
Releases: 4.5, 4.6

Change-Id: I065f2c94c586237963e553fddc4ebbea7d199915
Reviewed-on: http://review.typo3.org/5890
Reviewed-by: Oliver Klee
Reviewed-by: Thierry Brodard
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
typo3/sysext/cms/tslib/content/class.tslib_content_abstract.php

index 1a2bb0f..97571e9 100644 (file)
@@ -57,6 +57,15 @@ abstract class tslib_content_Abstract {
        public abstract function render($conf = array());
 
        /**
+        * Getter for current cObj
+        *
+        * @return tslib_cObj
+        */
+       public function getContentObject() {
+               return $this->cObj;
+       }
+
+       /**
         * Compatibility stdWrap wrapper.
         *
         * @param       string          $content The content to manipulate using stdWrap functions.
@@ -71,4 +80,4 @@ abstract class tslib_content_Abstract {
 
 }
 
-?>
\ No newline at end of file
+?>