Added post-process Hook in class.t3lib_befunc.php for method "getFlexFormDS"
authorBernhard Kraft <kraftb@think-open.at>
Wed, 27 Apr 2005 21:25:38 +0000 (21:25 +0000)
committerBernhard Kraft <kraftb@think-open.at>
Wed, 27 Apr 2005 21:25:38 +0000 (21:25 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@678 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_befunc.php

index 11e71f6..3de323a 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2005-04-27  Kraft Bernhard <kraftb@kraftb.at>
+
+       * Added post-process Hook in class.t3lib_befunc.php for method "getFlexFormDS"
+
 2005-04-27  Rupert Germann  <rupi@gmx.li>
 
        * fix for bug 536: removed a hardcoded tt_news reference which inserted the admin name as news author.
index 53cfb51..fd78f4e 100755 (executable)
@@ -942,7 +942,8 @@ class t3lib_BEfunc  {
         * @return      mixed           If array, the data structure was found and returned as an array. Otherwise (string) it is an error message.
         * @see t3lib_TCEforms::getSingleField_typeFlex()
         */
-       function getFlexFormDS($conf,$row,$table)       {
+       function getFlexFormDS($conf,$row,$table, $fieldName = '')      {
+               global $TYPO3_CONF_VARS;
 
                        // Get pointer field etc from TCA-config:
                $ds_pointerField =      $conf['ds_pointerField'];
@@ -1012,6 +1013,17 @@ class t3lib_BEfunc       {
                                }
                        } else $dataStructArray='No source value in fieldname "'.$ds_pointerField.'"';  // Error message.
                } else $dataStructArray='No proper configuration!';
+
+                       // Hook for post-processing the Flexform DS. Introduces the possibility to configure Flexforms via TSConfig
+               if (is_array ($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_befunc.php']['getFlexFormDSClass'])) {
+                       foreach ($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_befunc.php']['getFlexFormDSClass'] as $classRef) {
+                               $hookObj = &t3lib_div::getUserObj($classRef);
+                               if (method_exists($hookObj, 'getFlexFormDS_postProcessDS')) {
+                                       $hookObj->getFlexFormDS_postProcessDS($dataStructArray, $conf, $row, $table, $fieldName);
+                               }
+                       }
+               }
+
                return $dataStructArray;
        }