00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 require_once(t3lib_extMgm::extPath('date2cal') . 'src/class.tx_date2cal_shared.php');
00026
00032 class tx_date2cal_befunc
00033 {
00045 function getFlexFormDS_postProcessDS(&$dataStructArray, $conf, $row, $table, $fieldName) {
00046 if (is_array($dataStructArray['ROOT']) && is_array($dataStructArray['ROOT']['el']))
00047 $this->flexformNoTabs($dataStructArray);
00048 elseif (is_array($dataStructArray['sheets']))
00049 $this->flexformTabbed($dataStructArray);
00050 }
00051
00058 function flexformNoTabs(&$dataStructArray) {
00059 foreach($dataStructArray['ROOT']['el'] as $field => $fConf) {
00060
00061 $type = tx_date2cal_shared::isDateOrDateTime($fConf['TCEforms']['config']);
00062 if ($type === false)
00063 continue;
00064
00065
00066 tx_date2cal_shared::addWizard($dataStructArray['ROOT']['el'][$field]['TCEforms'], $type);
00067 }
00068 }
00069
00076 function flexformTabbed(&$dataStructArray) {
00077 foreach($dataStructArray['sheets'] as $sheet => $sheetData) {
00078 list($sheetData, $sheet) = t3lib_div::resolveSheetDefInDS($dataStructArray, $sheet);
00079 foreach($sheetData['ROOT']['el'] as $field => $fConf)
00080 {
00081
00082 $type = tx_date2cal_shared::isDateOrDateTime($fConf['TCEforms']['config']);
00083 if ($type === false)
00084 continue;
00085
00086
00087 tx_date2cal_shared::addWizard(
00088 $dataStructArray['sheets'][$sheet]['ROOT']['el'][$field]['TCEforms'], $type);
00089 }
00090 }
00091 }
00092 }
00093
00094 ?>