src/class.tx_date2cal_befunc.php

Go to the documentation of this file.
00001 <?php
00002 /***************************************************************
00003 *  Copyright notice
00004 *
00005 *  (c) 2006 - 2008 Stefan Galinski (stefan.galinski@gmail.com)
00006 *  All rights reserved
00007 *
00008 *  This script is part of the TYPO3 project. The TYPO3 project is
00009 *  free software; you can redistribute it and/or modify
00010 *  it under the terms of the GNU General Public License as published by
00011 *  the Free Software Foundation; either version 2 of the License, or
00012 *  (at your option) any later version.
00013 *
00014 *  The GNU General Public License can be found at
00015 *  http://www.gnu.org/copyleft/gpl.html.
00016 *
00017 *  This script is distributed in the hope that it will be useful,
00018 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00019 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020 *  GNU General Public License for more details.
00021 *
00022 *  This copyright notice MUST APPEAR in all copies of the script!
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                         // type check
00061                         $type = tx_date2cal_shared::isDateOrDateTime($fConf['TCEforms']['config']);
00062                         if ($type === false)
00063                                 continue;
00064 
00065                         // add wizard
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                                 // type check
00082                                 $type = tx_date2cal_shared::isDateOrDateTime($fConf['TCEforms']['config']);
00083                                 if ($type === false)
00084                                         continue;
00085 
00086                                 // add wizard
00087                                 tx_date2cal_shared::addWizard(
00088                                         $dataStructArray['sheets'][$sheet]['ROOT']['el'][$field]['TCEforms'], $type);
00089                         }
00090                 }
00091         }
00092 }
00093 
00094 ?>

Generated on Thu Mar 20 21:55:20 2008 for date2cal by  doxygen 1.5.3