39 'pObj' =>
'Using TypoScriptTemplateInformationModuleFunctionController::$pObj is deprecated and will not be possible anymore in TYPO3 v10.0.',
40 'function_key' =>
'Using TypoScriptTemplateInformationModuleFunctionController::$function_key is deprecated, property will be removed in TYPO3 v10.0.',
41 'extClassConf' =>
'Using TypoScriptTemplateInformationModuleFunctionController::$extClassConf is deprecated, property will be removed in TYPO3 v10.0.',
42 'localLangFile' =>
'Using TypoScriptTemplateInformationModuleFunctionController::$localLangFile is deprecated, property will be removed in TYPO3 v10.0.',
43 'tce_processed' =>
'Using TypoScriptTemplateInformationModuleFunctionController::$tce_processed is deprecated, property will be removed in TYPO3 v10.0.',
50 'initialize_editor' =>
'Using TypoScriptTemplateInformationModuleFunctionController::initialize_editor() is deprecated and will not be possible anymore in TYPO3 v10.0.',
51 'tableRowData' =>
'Using TypoScriptTemplateInformationModuleFunctionController::tableRowData() is deprecated and will not be possible anymore in TYPO3 v10.0.',
52 'handleExternalFunctionValue' =>
'Using TypoScriptTemplateInformationModuleFunctionController::handleExternalFunctionValue() is deprecated, method will be removed in TYPO3 v10.0.',
122 if (!empty($this->localLangFile)) {
126 $this->
id = (int)GeneralUtility::_GP(
'id');
147 'columnsOnly' => $field,
148 'createExtension' => 0,
149 'returnUrl' => GeneralUtility::getIndpEnv(
'REQUEST_URI')
152 $uriBuilder = GeneralUtility::makeInstance(\
TYPO3\CMS\Backend\Routing\UriBuilder::class);
153 $url = (string)$uriBuilder->buildUriFromRoute(
'record_edit', $urlParameters);
175 $this->templateService = GeneralUtility::makeInstance(ExtendedTemplateService::class);
178 $this->templateRow = $this->templateService->ext_getFirstTemplate($pageId, $template_uid);
179 if (is_array($this->templateRow)) {
190 public function main()
193 $manyTemplatesMenu = $this->pObj->templateMenu();
195 if ($manyTemplatesMenu) {
196 $template_uid = $this->pObj->MOD_SETTINGS[
'templatesOnPage'];
201 if ($existTemplate) {
202 $saveId = $this->templateRow[
'_ORIG_uid'] ?: $this->templateRow[
'uid'];
205 $uriBuilder = GeneralUtility::makeInstance(\
TYPO3\CMS\Backend\Routing\UriBuilder::class);
207 $newId = $this->pObj->createTemplate($this->
id, $saveId);
212 'SET[templatesOnPage]' => $newId
214 $url = (string)$uriBuilder->buildUriFromRoute(
'web_ts', $urlParameters);
218 if ($existTemplate) {
220 $lang->includeLLFile(
'EXT:tstemplate/Resources/Private/Language/locallang_info.xlf');
222 $assigns[
'LLPrefix'] =
'LLL:EXT:tstemplate/Resources/Private/Language/locallang_info.xlf:';
224 $assigns[
'title'] = trim($this->templateRow[
'title']);
225 $assigns[
'siteTitle'] = trim($this->templateRow[
'sitetitle']);
227 if ($manyTemplatesMenu) {
228 $assigns[
'manyTemplatesMenu'] = $manyTemplatesMenu;
233 $tableRows[] = $this->
tableRowData($lang->getLL(
'title'), $this->templateRow[
'title'],
'title', $this->templateRow[
'uid']);
234 $tableRows[] = $this->
tableRowData($lang->getLL(
'sitetitle'), $this->templateRow[
'sitetitle'],
'sitetitle', $this->templateRow[
'uid']);
235 $tableRows[] = $this->
tableRowData($lang->getLL(
'description'), $this->templateRow[
'description'],
'description', $this->templateRow[
'uid']);
236 $tableRows[] = $this->
tableRowData($lang->getLL(
'constants'), sprintf($lang->getLL(
'editToView'), trim($this->templateRow[
'constants']) ? count(explode(LF, $this->templateRow[
'constants'])) : 0),
'constants', $this->templateRow[
'uid']);
237 $tableRows[] = $this->
tableRowData($lang->getLL(
'setup'), sprintf($lang->getLL(
'editToView'), trim($this->templateRow[
'config']) ? count(explode(LF, $this->templateRow[
'config'])) : 0),
'config', $this->templateRow[
'uid']);
238 $assigns[
'tableRows'] = $tableRows;
244 $this->templateRow[
'uid'] =>
'edit'
247 'createExtension' => 0,
248 'returnUrl' => GeneralUtility::getIndpEnv(
'REQUEST_URI')
250 $assigns[
'editAllUrl'] = (string)$uriBuilder->buildUriFromRoute(
'record_edit', $urlParameters);
253 $view = GeneralUtility::makeInstance(StandaloneView::class);
254 $view->setTemplatePathAndFilename(GeneralUtility::getFileAbsFileName(
255 'EXT:tstemplate/Resources/Private/Templates/InformationModule.html'
257 $view->assignMultiple($assigns);
258 $theOutput = $view->render();
260 $theOutput = $this->pObj->noTemplate(1);
275 if ($this->function_key) {
276 $this->extClassConf = $this->pObj->getExternalItemConfig(
'web_ts', $this->function_key, $this->pObj->MOD_SETTINGS[$this->function_key]);