/** * @param DataMap $dataMap * @param string $tableName * @return DataMap */ protected function addMetaDataColumnNames(\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMap $dataMap, $tableName) { $controlSection = $GLOBALS['TCA'][$tableName]['ctrl']; $dataMap->setPageIdColumnName('pid'); if (isset($controlSection['tstamp'])) { $dataMap->setModificationDateColumnName($controlSection['tstamp']); } if (isset($controlSection['crdate'])) { $dataMap->setCreationDateColumnName($controlSection['crdate']); } if (isset($controlSection['cruser_id'])) { $dataMap->setCreatorColumnName($controlSection['cruser_id']); } if (isset($controlSection['delete'])) { $dataMap->setDeletedFlagColumnName($controlSection['delete']); } if (isset($controlSection['languageField'])) { $dataMap->setLanguageIdColumnName($controlSection['languageField']); } if (isset($controlSection['transOrigPointerField'])) { $dataMap->setTranslationOriginColumnName($controlSection['transOrigPointerField']); } if (isset($controlSection['transOrigDiffSourceField'])) { $dataMap->setTranslationOriginDiffSourceName($controlSection['transOrigDiffSourceField']); } if (isset($controlSection['type'])) { $dataMap->setRecordTypeColumnName($controlSection['type']); } if (isset($controlSection['rootLevel'])) { $dataMap->setRootLevel($controlSection['rootLevel']); } if (isset($controlSection['is_static'])) { $dataMap->setIsStatic($controlSection['is_static']); } if (isset($controlSection['enablecolumns']['disabled'])) { $dataMap->setDisabledFlagColumnName($controlSection['enablecolumns']['disabled']); } if (isset($controlSection['enablecolumns']['starttime'])) { $dataMap->setStartTimeColumnName($controlSection['enablecolumns']['starttime']); } if (isset($controlSection['enablecolumns']['endtime'])) { $dataMap->setEndTimeColumnName($controlSection['enablecolumns']['endtime']); } if (isset($controlSection['enablecolumns']['fe_group'])) { $dataMap->setFrontEndUserGroupColumnName($controlSection['enablecolumns']['fe_group']); } return $dataMap; }