46 $table = $this->data[
'tableName'];
47 $row = $this->data[
'databaseRow'];
50 if (empty($this->data[
'fieldListToRender'])) {
51 $options[
'renderType'] =
'fullRecordContainer';
53 $options[
'renderType'] =
'listOfFieldsContainer';
55 $result = $this->nodeFactory->create($options)->render();
57 $childHtml = $result[
'html'];
61 if ($this->data[
'effectivePid'] >= 0) {
66 $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
67 $icon =
'<span title="' . htmlspecialchars($recordPath) .
'">' . $iconFactory->getIconForRecord($table, $row,
Icon::SIZE_SMALL)->render() .
'</span>';
70 $tableTitle = $languageService->sL($this->data[
'processedTca'][
'ctrl'][
'title']);
72 if ($this->data[
'command'] ===
'new') {
73 $newOrUid =
' <span class="typo3-TCEforms-newToken">' . htmlspecialchars($languageService->sL(
'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.new')) .
'</span>';
78 if ($table ===
'pages') {
79 $label = htmlspecialchars($languageService->sL(
'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.createNewPage'));
80 $pageTitle = sprintf($label, $tableTitle);
82 $label = htmlspecialchars($languageService->sL(
'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.createNewRecord'));
83 if ($this->data[
'effectivePid'] === 0) {
84 $label = htmlspecialchars($languageService->sL(
'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.createNewRecordRootLevel'));
86 $pageTitle = sprintf($label, $tableTitle, $pageTitle);
90 $newOrUid =
' <span class="typo3-TCEforms-recUid">[' . htmlspecialchars($row[
'uid']) .
']</span>';
94 if ($table ===
'pages') {
95 $label = htmlspecialchars($languageService->sL(
'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.editPage'));
96 $pageTitle = sprintf($label, $tableTitle, $recordLabel);
98 $label = htmlspecialchars($languageService->sL(
'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.editRecord'));
101 if (empty($recordLabel)) {
102 $label = htmlspecialchars($languageService->sL(
'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.editRecordNoTitle'));
104 if ($this->data[
'effectivePid'] === 0) {
105 $label = htmlspecialchars($languageService->sL(
'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.editRecordRootLevel'));
107 if (!empty($recordLabel)) {
109 $pageTitle = sprintf($label, $tableTitle, $recordLabel, $pageTitle);
112 $pageTitle = sprintf($label, $tableTitle, $pageTitle);
117 $view = GeneralUtility::makeInstance(StandaloneView::class);
118 $view->setTemplatePathAndFilename(GeneralUtility::getFileAbsFileName(
119 'EXT:backend/Resources/Private/Templates/OuterWrapContainer.html'
122 $descriptionColumn = !empty($this->data[
'processedTca'][
'ctrl'][
'descriptionColumn'])
123 ? $this->data[
'processedTca'][
'ctrl'][
'descriptionColumn'] :
null;
124 if ($descriptionColumn !==
null) {
125 $view->assign(
'recordDescription', $this->data[
'databaseRow'][$descriptionColumn]);
127 $readOnlyRecord = !empty($this->data[
'processedTca'][
'ctrl'][
'readOnly'])
128 ? (bool)$this->data[
'processedTca'][
'ctrl'][
'readOnly'] :
null;
129 if ($readOnlyRecord ===
true) {
130 $view->assign(
'recordReadonly',
true);
133 $fieldInformationHtml = $fieldInformationResult[
'html'];
137 $fieldWizardHtml = $fieldWizardResult[
'html'];
140 $view->assignMultiple([
141 'pageTitle' => $pageTitle,
142 'fieldInformationHtml' => $fieldInformationHtml,
143 'fieldWizardHtml' => $fieldWizardHtml,
144 'childHtml' => $childHtml,
146 'tableTitle' => $tableTitle,
147 'newOrUid' => $newOrUid,
148 'isNewRecord' => $this->data[
'command'] ===
'new'
150 $result[
'html'] = $view->render();