/** * Creation/update a language pack for the Static Info Tables * * @return string An HTML display of data overview */ public function sqlDumpNonLocalizedDataAction() { // Create a SQL dump of non-localized data $dumpContent = array(); $dumpContent[] = $this->countryRepository->sqlDumpNonLocalizedData(); $dumpContent[] = $this->countryZoneRepository->sqlDumpNonLocalizedData(); $dumpContent[] = $this->currencyRepository->sqlDumpNonLocalizedData(); $dumpContent[] = $this->languageRepository->sqlDumpNonLocalizedData(); $dumpContent[] = $this->territoryRepository->sqlDumpNonLocalizedData(); // Write the SQL dump file $extensionKey = \TYPO3\CMS\Core\Utility\GeneralUtility::camelCaseToLowerCaseUnderscored($this->extensionName); $extensionPath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($extensionKey); $filename = 'export-ext_tables_static+adt.sql'; \TYPO3\CMS\Core\Utility\GeneralUtility::writeFile($extensionPath . $filename, implode(LF, $dumpContent)); $message = \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('sqlDumpCreated', $this->extensionName) . ' ' . $extensionPath . $filename; $this->addFlashMessage($message, '', \TYPO3\CMS\Core\Messaging\AbstractMessage::OK); $this->forward('information'); }
/** * Gets the update queries for this language pack * * @return string update queries in sql format */ public function getUpdateQueries() { $updateQueries = array(); $locale = $this->getLocale(); $updateQueries = array_merge($updateQueries, $this->countryRepository->getUpdateQueries($locale)); $updateQueries = array_merge($updateQueries, $this->countryZoneRepository->getUpdateQueries($locale)); $updateQueries = array_merge($updateQueries, $this->currencyRepository->getUpdateQueries($locale)); $updateQueries = array_merge($updateQueries, $this->languageRepository->getUpdateQueries($locale)); $updateQueries = array_merge($updateQueries, $this->territoryRepository->getUpdateQueries($locale)); return implode(LF, $updateQueries); }