From: Bernhard Kraft Date: Wed, 27 Apr 2005 21:25:38 +0000 (+0000) Subject: Added post-process Hook in class.t3lib_befunc.php for method "getFlexFormDS" X-Git-Tag: TYPO3_3-8-0rc1~43 X-Git-Url: http://git.typo3.org/Packages/TYPO3.CMS.git/commitdiff_plain/d44502cc741eeaffae240760c8823b89f9fec236?hp=61be902284c0ccc83af3a0d796a608a6a6c5ec3b Added post-process Hook in class.t3lib_befunc.php for method "getFlexFormDS" git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@678 709f56b5-9817-0410-a4d7-c38de5d9e867 --- diff --git a/ChangeLog b/ChangeLog index 11e71f60e489..3de323abf966 100755 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2005-04-27 Kraft Bernhard + + * Added post-process Hook in class.t3lib_befunc.php for method "getFlexFormDS" + 2005-04-27 Rupert Germann * fix for bug 536: removed a hardcoded tt_news reference which inserted the admin name as news author. diff --git a/t3lib/class.t3lib_befunc.php b/t3lib/class.t3lib_befunc.php index 53cfb51b330d..fd78f4edaf3f 100755 --- a/t3lib/class.t3lib_befunc.php +++ b/t3lib/class.t3lib_befunc.php @@ -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; }