コード例 #1
0
 /**
  * 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');
 }