コード例 #1
0
 /**
  * Fetch the tx_cal_* records and manipulate them
  * 
  * @param DataPreprocessor $recordData
  * @return void
  */
 public function fetchCalRecordPostProcessing(DataPreprocessor $recordData)
 {
     if (preg_match('/^tx_cal_(.*)$/', key($recordData->regTableItems)) == FALSE) {
         return;
     }
     foreach ($recordData->regTableItems_data as $key => $value) {
         $table = substr($key, 0, -(strlen($key) - strripos($key, '_')));
         $mainFields = new \TYPO3\CMS\Cal\Hooks\TceFormsGetmainfields();
         $mainFields->getMainFields_preProcess($table, $value, NULL);
         $recordData->regTableItems_data[$key] = $value;
     }
 }
コード例 #2
0
 /**
  * Migrate date and datetime db field values to timestamp
  *
  * @param array $result
  * @return array
  */
 public function addData(array $result)
 {
     if (\TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionNumberToInteger(TYPO3_version) >= 7006000) {
         $processedTcaColumns = $result['processedTca']['columns'];
     } else {
         $processedTcaColumns = $result['vanillaTableTca']['columns'];
     }
     foreach ($processedTcaColumns as $column => $columnConfig) {
         if (isset($columnConfig['config']['tx_cal_event'])) {
             $mainFields = new \TYPO3\CMS\Cal\Hooks\TceFormsGetmainfields();
             $mainFields->getMainFields_preProcess($result['tableName'], $result['databaseRow'], NULL);
             return $result;
         }
     }
     return $result;
 }