[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>
Fri, 4 Nov 2011 06:01:31 +0000 (07:01 +0100)
Without this getter method there's no clean way to access the current
tslib_cObj object from a custom media renderer for example.

Change-Id: I984f7cd6b6bae3245f0804f9b6bf35a9e20e15ca
Resolves: #30994
Releases: 4.5, 4.6, 5.7
Reviewed-on: http://review.typo3.org/6526
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 4777ed6..2dfbc74 100644 (file)
@@ -58,6 +58,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.
@@ -72,4 +81,4 @@ abstract class tslib_content_Abstract {
 
 }
 
-?>
\ No newline at end of file
+?>