55 $uriBuilder = GeneralUtility::makeInstance(\
TYPO3\CMS\Backend\Routing\UriBuilder::class);
56 $this->moduleUrl = (string)$uriBuilder->buildUriFromRoute(
'user_task');
58 $this->
getLanguageService()->includeLLFile(
'EXT:impexp/Resources/Private/Language/locallang_csh.xlf');
68 return $this->
main();
87 public function main()
90 $id = (int)GeneralUtility::_GP(
'display');
92 $uriBuilder = GeneralUtility::makeInstance(\
TYPO3\CMS\Backend\Routing\UriBuilder::class);
95 $url = (string)$uriBuilder->buildUriFromRoute(
98 'tx_impexp[action]' =>
'export',
100 'preset[select]' => $id,
101 'returnUrl' => $this->moduleUrl
108 $content .= $this->taskObject->description($lang->getLL(
'.alttitle'), $lang->getLL(
'.description'));
114 if (is_array($presets) && !empty($presets)) {
116 foreach ($presets as $key => $presetCfg) {
117 $configuration = unserialize($presetCfg[
'preset_data'], [
'allowed_classes' =>
false]);
118 $title = strlen($presetCfg[
'title']) ? $presetCfg[
'title'] :
'[' . $presetCfg[
'uid'] .
']';
119 $icon =
'EXT:impexp/Resources/Public/Images/export.gif';
122 if ($presetCfg[
'public']) {
123 $description[] = $lang->getLL(
'task.public') .
': ' . $lang->sL(
'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:yes');
126 $description[] = $lang->getLL(
'task.owner') .
': '
128 $presetCfg[
'user_uid'] ===
$GLOBALS[
'BE_USER']->user[
'uid']
129 ? $lang->getLL(
'task.own')
130 :
'[' . htmlspecialchars($usernames[$presetCfg[
'user_uid']][
'username']) .
']'
133 if ($configuration[
'pagetree'][
'id']) {
134 $description[] = $lang->getLL(
'task.page') .
': ' . $configuration[
'pagetree'][
'id'];
135 $description[] = $lang->getLL(
'task.path') .
': ' . htmlspecialchars(
139 $description[] = $lang->getLL(
'single-record');
142 if ($configuration[
'meta'][
'title'] || $configuration[
'meta'][
'description'] || $configuration[
'meta'][
'notes']) {
143 $metaInformation =
'';
144 if ($configuration[
'meta'][
'title']) {
145 $metaInformation .=
'<strong>' . htmlspecialchars($configuration[
'meta'][
'title']) .
'</strong><br />';
147 if ($configuration[
'meta'][
'description']) {
148 $metaInformation .= htmlspecialchars($configuration[
'meta'][
'description']);
150 if ($configuration[
'meta'][
'notes']) {
151 $metaInformation .=
'<br /><br />
152 <strong>' . $lang->getLL(
'notes') .
': </strong>
153 <em>' . htmlspecialchars($configuration[
'meta'][
'notes']) .
'</em>';
155 $description[] =
'<br />' . $metaInformation;
159 'uid' =>
'impexp' . $key,
162 'descriptionHtml' => implode(
'<br />', $description),
163 'link' => (string)$uriBuilder->buildUriFromRoute(
'user_task') .
'&SET[function]=impexp.TYPO3\\CMS\\Impexp\\Task\\ImportExportTask&display=' . $presetCfg[
'uid']
167 $content .= $this->taskObject->renderListMenu($lines);
170 $flashMessage = GeneralUtility::makeInstance(
172 $lang->getLL(
'no-presets'),
173 $lang->getLL(
'.alttitle'),
177 $flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class);
179 $defaultFlashMessageQueue = $flashMessageService->getMessageQueueByIdentifier();
180 $defaultFlashMessageQueue->enqueue($flashMessage);
193 $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
194 ->getQueryBuilderForTable(
'tx_impexp_presets');
196 return $queryBuilder->select(
'*')
197 ->from(
'tx_impexp_presets')
199 $queryBuilder->expr()->orX(
200 $queryBuilder->expr()->gt(
202 $queryBuilder->createNamedParameter(0, \PDO::PARAM_INT)
204 $queryBuilder->expr()->eq(
206 $queryBuilder->createNamedParameter($this->getBackendUser()->user[
'uid'], \PDO::PARAM_INT)
210 ->orderBy(
'item_uid',
'DESC')
211 ->addOrderBy(
'title')
225 $defaultImportExportFolder =
null;
228 if ($defaultTemporaryFolder !==
null) {
229 $importExportFolderName =
'importexport';
230 $createFolder = !$defaultTemporaryFolder->hasFolder($importExportFolderName);
231 if ($createFolder ===
true) {
233 $defaultImportExportFolder = $defaultTemporaryFolder->createFolder($importExportFolderName);
237 $defaultImportExportFolder = $defaultTemporaryFolder->getSubfolder($importExportFolderName);
241 return $defaultImportExportFolder;