2 namespace TYPO3\CMS\TstemplateInfo\Controller
;
5 * This class displays the Info/Modify screen of the Web > Template module
7 * @author Kasper Skårhøj <kasperYYYY@typo3.com>
9 class TypoScriptTemplateInformationModuleFunctionController
extends \TYPO3\CMS\Backend\Module\AbstractFunctionModule
{
12 * Indicator for t3editor, whether data is stored
16 public $tce_processed = FALSE;
19 * Creates a row for a HTML table
21 * @param string $label The label to be shown (e.g. 'Title:', 'Sitetitle:')
22 * @param string $data The data/information to be shown (e.g. 'Template for my site')
23 * @param string $field The field/variable to be sent on clicking the edit icon (e.g. 'title', 'sitetitle')
24 * @return string A row for a HTML table
25 * @todo Define visibility
27 public function tableRow($label, $data, $field) {
29 $urlParameters = array(
30 'id' => $this->pObj
->id
32 $aHref = \TYPO3\CMS\Backend\Utility\BackendUtility
::getModuleUrl('web_ts', $urlParameters);
33 $ret .= '<a href="' . htmlspecialchars(($aHref . '&e[' . $field . ']=1')) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility
::getSpriteIcon('actions-document-open', array('title' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:editField', TRUE))) . '<strong>' . $label . ' </strong></a>';
34 $ret .= '</td><td width="80%" class="bgColor4">' . $data . ' </td></tr>';
39 * Renders HTML table with available template resources/files
41 * @param string $resources List of resources/files to be shown (e.g. 'file_01.txt,file.txt')
42 * @param boolean $func Whether to render functions like 'to top' or 'delete' for each resource (default: FALSE)
43 * @return string HTML table with available template resources/files
44 * @todo Define visibility
46 public function procesResources($resources, $func = FALSE) {
47 $arr = \TYPO3\CMS\Core\Utility\GeneralUtility
::trimExplode(',', $resources . ',,', 1);
49 $bgcol = $func ?
' class="bgColor4"' : '';
50 foreach ($arr as $k => $v) {
51 $path = PATH_site
. $GLOBALS['TCA']['sys_template']['columns']['resources']['config']['uploadfolder'] . '/' . $v;
54 $functions = '<td bgcolor="red" nowrap="nowrap">' . $GLOBALS['LANG']->getLL('delete') . ' <input type="checkbox" name="data[remove_resource][' . $k . ']" value="' . htmlspecialchars($v) . '" /></td>';
55 $functions .= '<td' . $bgcol . ' nowrap="nowrap">' . $GLOBALS['LANG']->getLL('toTop') . ' <input type="checkbox" name="data[totop_resource][' . $k . ']" value="' . htmlspecialchars($v) . '" /></td>';
56 $functions .= '<td' . $bgcol . ' nowrap="nowrap">';
57 $fI = \TYPO3\CMS\Core\Utility\GeneralUtility
::split_fileref($v);
58 if (\TYPO3\CMS\Core\Utility\GeneralUtility
::inList($this->pObj
->textExtensions
, $fI['fileext'])) {
59 $urlParameters = array(
60 'id' => $this->pObj
->id
62 $aHref = \TYPO3\CMS\Backend\Utility\BackendUtility
::getModuleUrl('web_ts', $urlParameters);
63 $functions .= '<a href="' . htmlspecialchars(($aHref . '&e[file]=' . rawurlencode($v))) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility
::getSpriteIcon('actions-document-open', array('title' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:editFile', TRUE))) . '</a>';
65 $functions .= '</td>';
67 $thumb = \TYPO3\CMS\Backend\Utility\BackendUtility
::thumbCode(array('resources' => $v), 'sys_template', 'resources', $GLOBALS['BACK_PATH'], '');
68 $out .= '<tr><td' . $bgcol . ' nowrap="nowrap">' . $v . ' </td><td' . $bgcol . ' nowrap="nowrap"> ' . \TYPO3\CMS\Core\Utility\GeneralUtility
::formatSize(@filesize
($path)) . ' </td>' . $functions . '<td' . $bgcol . '>' . trim($thumb) . '</td></tr>';
72 $out = '<table border="0" cellpadding="1" cellspacing="1" width="100%">' . $out . '</table>';
73 $out = '<table border="0" cellpadding="0" cellspacing="0">
74 <tr><td class="bgColor2">' . $out . '<img src="clear.gif" width="465px" height="1px"></td></tr>
77 $out = '<table border="0" cellpadding="0" cellspacing="0">' . $out . '</table>';
84 * Renders HTML table with all available template resources/files in the current rootline that could be copied
86 * @param integer $id The uid of the current page
87 * @param integer $template_uid The uid of the template record to be rendered (only if more than one template on the current page)
88 * @return string HTML table with all available template resources/files in the current rootline that could be copied
89 * @todo Define visibility
91 public function resourceListForCopy($id, $template_uid) {
93 $sys_page = \TYPO3\CMS\Core\Utility\GeneralUtility
::makeInstance('TYPO3\\CMS\\Frontend\\Page\\PageRepository');
94 $rootLine = $sys_page->getRootLine($id);
95 // This generates the constants/config + hierarchy info for the template.
96 $tmpl->runThroughTemplates($rootLine, $template_uid);
97 $theResources = \TYPO3\CMS\Core\Utility\GeneralUtility
::trimExplode(',', $tmpl->resources
, 1);
98 foreach ($theResources as $k => $v) {
100 if (\TYPO3\CMS\Core\Utility\GeneralUtility
::inList($this->pObj
->textExtensions
, strtolower($fI['extension']))) {
101 $path = PATH_site
. $GLOBALS['TCA']['sys_template']['columns']['resources']['config']['uploadfolder'] . '/' . $v;
102 $thumb = \TYPO3\CMS\Backend\Utility\BackendUtility
::thumbCode(array('resources' => $v), 'sys_template', 'resources', $GLOBALS['BACK_PATH'], '');
103 $out .= '<tr><td' . $bgcol . ' nowrap="nowrap">' . $v . ' </td><td' . $bgcol . ' nowrap="nowrap"> ' . \TYPO3\CMS\Core\Utility\GeneralUtility
::formatSize(@filesize
($path)) . ' </td><td' . $bgcol . '>' . trim($thumb) . '</td><td><input type="Checkbox" name="data[makecopy_resource][' . $k . ']" value="' . htmlspecialchars($v) . '"></td></tr>';
106 $out = $out ?
'<table border="0" cellpadding="0" cellspacing="0">' . $out . '</table>' : '';
111 * Create an instance of t3lib_tsparser_ext in $GLOBALS['tmpl'] and looks for the first (visible) template
112 * record. If $template_uid was given and greater than zero, this record will be checked.
114 * @param integer $pageId The uid of the current page
115 * @param integer $template_uid: The uid of the template record to be rendered (only if more than one template on the current page)
116 * @return boolean Returns TRUE if a template record was found, otherwise FALSE
117 * @todo Define visibility
119 public function initialize_editor($pageId, $template_uid = 0) {
120 // Initializes the module. Done in this function because we may need to re-initialize if data is submitted!
121 global $tmpl, $tplRow, $theConstants;
122 // Defined global here!
123 $tmpl = \TYPO3\CMS\Core\Utility\GeneralUtility
::makeInstance('TYPO3\\CMS\\Core\\TypoScript\\ExtendedTemplateService');
124 // Do not log time-performance information
127 // Get the row of the first VISIBLE template of the page. whereclause like the frontend.
128 $tplRow = $tmpl->ext_getFirstTemplate($pageId, $template_uid);
129 if (is_array($tplRow)) {
130 $tplRow = $this->processTemplateRowAfterLoading($tplRow);
137 * Process template row after loading
139 * @param array $tplRow Template row
140 * @return array Preprocessed template row
141 * @author Fabrizio Branca <typo3@fabrizio-branca.de>
142 * @todo Define visibility
144 public function processTemplateRowAfterLoading(array $tplRow) {
145 if ($this->pObj
->MOD_SETTINGS
['includeTypoScriptFileContent']) {
146 // Let the recursion detection counter start at 91, so that only 10 recursive calls will be resolved
147 // Otherwise the editor will be bloated with way to many lines making it hard the break the cyclic recursion.
148 $tplRow['config'] = \TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser
::checkIncludeLines($tplRow['config'], 91);
149 $tplRow['constants'] = \TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser
::checkIncludeLines($tplRow['constants'], 91);
155 * Process template row before saving
157 * @param array $tplRow Template row
158 * @return array Preprocessed template row
159 * @author Fabrizio Branca <typo3@fabrizio-branca.de>
160 * @todo Define visibility
162 public function processTemplateRowBeforeSaving(array $tplRow) {
163 if ($this->pObj
->MOD_SETTINGS
['includeTypoScriptFileContent']) {
164 $tplRow = \TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser
::extractIncludes_array($tplRow);
170 * The main processing method if this class
172 * @return string Information of the template status or the taken actions as HTML string
173 * @todo Define visibility
175 public function main() {
177 global $tmpl, $tplRow, $theConstants;
178 $this->pObj
->MOD_MENU
['includeTypoScriptFileContent'] = TRUE;
179 $edit = $this->pObj
->edit
;
181 \TYPO3\CMS\Core\Utility\GeneralUtility
::loadTCA('sys_template');
182 // Checking for more than one template an if, set a menu...
183 $manyTemplatesMenu = $this->pObj
->templateMenu();
185 if ($manyTemplatesMenu) {
186 $template_uid = $this->pObj
->MOD_SETTINGS
['templatesOnPage'];
189 $existTemplate = $this->initialize_editor($this->pObj
->id
, $template_uid);
190 if ($existTemplate) {
191 $saveId = $tplRow['_ORIG_uid'] ?
$tplRow['_ORIG_uid'] : $tplRow['uid'];
193 // Create extension template
194 $newId = $this->pObj
->createTemplate($this->pObj
->id
, $saveId);
196 // Switch to new template
197 $urlParameters = array(
198 'id' => $this->pObj
->id
,
199 'SET[templatesOnPage]' => $newId
201 $aHref = \TYPO3\CMS\Backend\Utility\BackendUtility
::getModuleUrl('web_ts', $urlParameters);
202 \TYPO3\CMS\Core\Utility\HttpUtility
::redirect($aHref);
204 if ($existTemplate) {
206 $POST = \TYPO3\CMS\Core\Utility\GeneralUtility
::_POST();
207 if ($POST['submit'] || \TYPO3\CMS\Core\Utility\MathUtility
::canBeInterpretedAsInteger($POST['submit_x']) && \TYPO3\CMS\Core\Utility\MathUtility
::canBeInterpretedAsInteger($POST['submit_y']) ||
$POST['saveclose'] || \TYPO3\CMS\Core\Utility\MathUtility
::canBeInterpretedAsInteger($POST['saveclose_x']) && \TYPO3\CMS\Core\Utility\MathUtility
::canBeInterpretedAsInteger($POST['saveclose_y'])) {
208 // Set the data to be saved
210 $alternativeFileName = array();
211 $tmp_upload_name = '';
213 $tmp_newresource_name = '';
214 if (is_array($POST['data'])) {
215 foreach ($POST['data'] as $field => $val) {
226 $recData['sys_template'][$saveId][$field] = $val;
231 if (count($recData)) {
232 $recData['sys_template'][$saveId] = $this->processTemplateRowBeforeSaving($recData['sys_template'][$saveId]);
233 // Create new tce-object
234 $tce = \TYPO3\CMS\Core\Utility\GeneralUtility
::makeInstance('TYPO3\\CMS\\Core\\DataHandler\\DataHandler');
235 $tce->stripslashes_values
= 0;
236 $tce->alternativeFileName
= $alternativeFileName;
238 $tce->start($recData, array());
240 $tce->process_datamap();
241 // Clear the cache (note: currently only admin-users can clear the cache in tce_main.php)
242 $tce->clear_cacheCmd('all');
243 // tce were processed successfully
244 $this->tce_processed
= TRUE;
245 // re-read the template ...
246 $this->initialize_editor($this->pObj
->id
, $template_uid);
248 // If files has been edited:
249 if (is_array($edit)) {
250 if ($edit['filename'] && $tplRow['resources'] && \TYPO3\CMS\Core\Utility\GeneralUtility
::inList($tplRow['resources'], $edit['filename'])) {
251 // Check if there are resources, and that the file is in the resourcelist.
252 $path = PATH_site
. $GLOBALS['TCA']['sys_template']['columns']['resources']['config']['uploadfolder'] . '/' . $edit['filename'];
253 $fI = \TYPO3\CMS\Core\Utility\GeneralUtility
::split_fileref($edit['filename']);
254 if (@is_file
($path) && \TYPO3\CMS\Core\Utility\GeneralUtility
::getFileAbsFileName($path) && \TYPO3\CMS\Core\Utility\GeneralUtility
::inList($this->pObj
->textExtensions
, $fI['fileext'])) {
255 // checks that have already been done.. Just to make sure
256 // @TODO: Check if the hardcorded value already has a config member, otherwise create one
257 // Checks that have already been done.. Just to make sure
258 if (filesize($path) < 30720) {
259 \TYPO3\CMS\Core\Utility\GeneralUtility
::writeFile($path, $edit['file']);
260 $theOutput .= $this->pObj
->doc
->spacer(10);
261 $theOutput .= $this->pObj
->doc
->section('<font color=red>' . $GLOBALS['LANG']->getLL('fileChanged') . '</font>', sprintf($GLOBALS['LANG']->getLL('resourceUpdated'), $edit['filename']), 0, 0, 0, 1);
262 // Clear cache - the file has probably affected the template setup
263 // @TODO: Check if the edited file really had something to do with cached data and prevent this clearing if possible!
264 /** @var $tce \TYPO3\CMS\Core\DataHandler\DataHandler */
265 $tce = \TYPO3\CMS\Core\Utility\GeneralUtility
::makeInstance('TYPO3\\CMS\\Core\\DataHandler\\DataHandler');
266 $tce->stripslashes_values
= 0;
267 $tce->start(array(), array());
268 $tce->clear_cacheCmd('all');
274 // Hook post updating template/TCE processing
275 if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/tstemplate_info/class.tx_tstemplateinfo.php']['postTCEProcessingHook'])) {
276 $postTCEProcessingHook =& $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/tstemplate_info/class.tx_tstemplateinfo.php']['postTCEProcessingHook'];
277 if (is_array($postTCEProcessingHook)) {
278 $hookParameters = array(
282 foreach ($postTCEProcessingHook as $hookFunction) {
283 \TYPO3\CMS\Core\Utility\GeneralUtility
::callUserFunction($hookFunction, $hookParameters, $this);
287 $content = \TYPO3\CMS\Backend\Utility\IconUtility
::getSpriteIconForRecord('sys_template', $tplRow) . '<strong>' . htmlspecialchars($tplRow['title']) . '</strong>' . htmlspecialchars((trim($tplRow['sitetitle']) ?
' (' . $tplRow['sitetitle'] . ')' : ''));
288 $theOutput .= $this->pObj
->doc
->section($GLOBALS['LANG']->getLL('templateInformation'), $content, 0, 1);
289 if ($manyTemplatesMenu) {
290 $theOutput .= $this->pObj
->doc
->section('', $manyTemplatesMenu);
292 $theOutput .= $this->pObj
->doc
->spacer(10);
294 // If abort pressed, nothing should be edited:
295 if ($POST['abort'] || \TYPO3\CMS\Core\Utility\MathUtility
::canBeInterpretedAsInteger($POST['abort_x']) && \TYPO3\CMS\Core\Utility\MathUtility
::canBeInterpretedAsInteger($POST['abort_y']) ||
$POST['saveclose'] || \TYPO3\CMS\Core\Utility\MathUtility
::canBeInterpretedAsInteger($POST['saveclose_x']) && \TYPO3\CMS\Core\Utility\MathUtility
::canBeInterpretedAsInteger($POST['saveclose_y'])) {
299 $outCode = '<input type="Text" name="data[title]" value="' . htmlspecialchars($tplRow['title']) . '"' . $this->pObj
->doc
->formWidth() . '>';
300 $outCode .= '<input type="Hidden" name="e[title]" value="1">';
301 $theOutput .= $this->pObj
->doc
->spacer(15);
302 $theOutput .= $this->pObj
->doc
->section($GLOBALS['LANG']->getLL('title'), $outCode, TRUE);
304 if ($e['sitetitle']) {
305 $outCode = '<input type="Text" name="data[sitetitle]" value="' . htmlspecialchars($tplRow['sitetitle']) . '"' . $this->pObj
->doc
->formWidth() . '>';
306 $outCode .= '<input type="Hidden" name="e[sitetitle]" value="1">';
307 $theOutput .= $this->pObj
->doc
->spacer(15);
308 $theOutput .= $this->pObj
->doc
->section($GLOBALS['LANG']->getLL('sitetitle'), $outCode, TRUE);
310 if ($e['description']) {
311 $outCode = '<textarea name="data[description]" rows="5" class="fixed-font enable-tab"' . $this->pObj
->doc
->formWidthText(48, '', '') . '>' . \TYPO3\CMS\Core\Utility\GeneralUtility
::formatForTextarea($tplRow['description']) . '</textarea>';
312 $outCode .= '<input type="Hidden" name="e[description]" value="1">';
313 $theOutput .= $this->pObj
->doc
->spacer(15);
314 $theOutput .= $this->pObj
->doc
->section($GLOBALS['LANG']->getLL('description'), $outCode, TRUE);
316 if ($e['constants']) {
317 $outCode = '<textarea name="data[constants]" rows="' . $numberOfRows . '" wrap="off" class="fixed-font enable-tab"' . $this->pObj
->doc
->formWidthText(48, 'width:98%;height:70%', 'off') . ' class="fixed-font">' . \TYPO3\CMS\Core\Utility\GeneralUtility
::formatForTextarea($tplRow['constants']) . '</textarea>';
318 $outCode .= '<input type="Hidden" name="e[constants]" value="1">';
319 // Display "Include TypoScript file content?" checkbox
320 $outCode .= \TYPO3\CMS\Backend\Utility\BackendUtility
::getFuncCheck($this->pObj
->id
, 'SET[includeTypoScriptFileContent]', $this->pObj
->MOD_SETTINGS
['includeTypoScriptFileContent'], '', '&e[constants]=1', 'id="checkIncludeTypoScriptFileContent"');
321 $outCode .= '<label for="checkIncludeTypoScriptFileContent">' . $GLOBALS['LANG']->getLL('includeTypoScriptFileContent') . '</label><br />';
322 $theOutput .= $this->pObj
->doc
->spacer(15);
323 $theOutput .= $this->pObj
->doc
->section($GLOBALS['LANG']->getLL('constants'), '', TRUE);
324 $theOutput .= $this->pObj
->doc
->sectionEnd() . $outCode;
327 $path = PATH_site
. $GLOBALS['TCA']['sys_template']['columns']['resources']['config']['uploadfolder'] . '/' . $e[file
];
328 $fI = \TYPO3\CMS\Core\Utility\GeneralUtility
::split_fileref($e[file
]);
329 if (@is_file
($path) && \TYPO3\CMS\Core\Utility\GeneralUtility
::inList($this->pObj
->textExtensions
, $fI['fileext'])) {
330 if (filesize($path) < $GLOBALS['TCA']['sys_template']['columns']['resources']['config']['max_size'] * 1024) {
331 $fileContent = \TYPO3\CMS\Core\Utility\GeneralUtility
::getUrl($path);
332 $outCode = $GLOBALS['LANG']->getLL('file') . ' <strong>' . $e[file
] . '</strong><BR>';
333 $outCode .= '<textarea name="edit[file]" rows="' . $numberOfRows . '" wrap="off" class="fixed-font enable-tab"' . $this->pObj
->doc
->formWidthText(48, 'width:98%;height:70%', 'off') . ' class="fixed-font">' . \TYPO3\CMS\Core\Utility\GeneralUtility
::formatForTextarea($fileContent) . '</textarea>';
334 $outCode .= '<input type="Hidden" name="edit[filename]" value="' . $e[file
] . '">';
335 $outCode .= '<input type="Hidden" name="e[file]" value="' . htmlspecialchars($e[file
]) . '">';
336 $theOutput .= $this->pObj
->doc
->spacer(15);
337 $theOutput .= $this->pObj
->doc
->section($GLOBALS['LANG']->getLL('editResource'), '');
338 $theOutput .= $this->pObj
->doc
->sectionEnd() . $outCode;
340 $theOutput .= $this->pObj
->doc
->spacer(15);
341 $fileToBig = sprintf($GLOBALS['LANG']->getLL('filesizeExceeded'), $GLOBALS['TCA']['sys_template']['columns']['resources']['config']['max_size']);
342 $filesizeNotAllowed = sprintf($GLOBALS['LANG']->getLL('notAllowed'), $GLOBALS['TCA']['sys_template']['columns']['resources']['config']['max_size']);
343 $theOutput .= $this->pObj
->doc
->section('<font color=red>' . $fileToBig . '</font>', $filesizeNotAllowed, 0, 0, 0, 1);
348 $outCode = '<textarea name="data[config]" rows="' . $numberOfRows . '" wrap="off" class="fixed-font enable-tab"' . $this->pObj
->doc
->formWidthText(48, 'width:98%;height:70%', 'off') . ' class="fixed-font">' . \TYPO3\CMS\Core\Utility\GeneralUtility
::formatForTextarea($tplRow['config']) . '</textarea>';
349 $outCode .= '<input type="Hidden" name="e[config]" value="1">';
350 // Display "Include TypoScript file content?" checkbox
351 $outCode .= \TYPO3\CMS\Backend\Utility\BackendUtility
::getFuncCheck($this->pObj
->id
, 'SET[includeTypoScriptFileContent]', $this->pObj
->MOD_SETTINGS
['includeTypoScriptFileContent'], '', '&e[config]=1', 'id="checkIncludeTypoScriptFileContent"');
352 $outCode .= '<label for="checkIncludeTypoScriptFileContent">' . $GLOBALS['LANG']->getLL('includeTypoScriptFileContent') . '</label><br />';
353 if (\TYPO3\CMS\Core\Extension\ExtensionManager
::isLoaded('tsconfig_help')) {
354 $url = $BACK_PATH . 'wizard_tsconfig.php?mode=tsref';
356 'formName' => 'editForm',
357 'itemName' => 'data[config]'
359 $outCode .= '<a href="#" onClick="vHWin=window.open(\'' . $url . \TYPO3\CMS\Core\Utility\GeneralUtility
::implodeArrayForUrl('', array('P' => $params)) . '\',\'popUp' . $md5ID . '\',\'height=500,width=780,status=0,menubar=0,scrollbars=1\');vHWin.focus();return false;">' . \TYPO3\CMS\Backend\Utility\IconUtility
::getSpriteIcon('actions-system-typoscript-documentation-open', array('title' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:tsRef', TRUE))) . '</a>';
361 $theOutput .= $this->pObj
->doc
->spacer(15);
362 $theOutput .= $this->pObj
->doc
->section($GLOBALS['LANG']->getLL('setup'), '', TRUE);
363 $theOutput .= $this->pObj
->doc
->sectionEnd() . $outCode;
367 $outCode .= $this->tableRow($GLOBALS['LANG']->getLL('title'), htmlspecialchars($tplRow['title']), 'title');
368 $outCode .= $this->tableRow($GLOBALS['LANG']->getLL('sitetitle'), htmlspecialchars($tplRow['sitetitle']), 'sitetitle');
369 $outCode .= $this->tableRow($GLOBALS['LANG']->getLL('description'), nl2br(htmlspecialchars($tplRow['description'])), 'description');
370 $outCode .= $this->tableRow($GLOBALS['LANG']->getLL('constants'), sprintf($GLOBALS['LANG']->getLL('editToView'), trim($tplRow[constants
]) ?
count(explode(LF
, $tplRow[constants
])) : 0), 'constants');
371 $outCode .= $this->tableRow($GLOBALS['LANG']->getLL('setup'), sprintf($GLOBALS['LANG']->getLL('editToView'), trim($tplRow[config
]) ?
count(explode(LF
, $tplRow[config
])) : 0), 'config');
372 $outCode = '<table class="t3-table-info">' . $outCode . '</table>';
374 $outCode .= '<br /><a href="#" onClick="' . \TYPO3\CMS\Backend\Utility\BackendUtility
::editOnClick((rawurlencode('&createExtension=0') . '&edit[sys_template][' . $tplRow['uid'] . ']=edit'), $BACK_PATH, '') . '"><strong>' . \TYPO3\CMS\Backend\Utility\IconUtility
::getSpriteIcon('actions-document-open', array('title' => $GLOBALS['LANG']->getLL('editTemplateRecord'))) . $GLOBALS['LANG']->getLL('editTemplateRecord') . '</strong></a>';
375 $theOutput .= $this->pObj
->doc
->section('', $outCode);
376 // hook after compiling the output
377 if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/tstemplate_info/class.tx_tstemplateinfo.php']['postOutputProcessingHook'])) {
378 $postOutputProcessingHook =& $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/tstemplate_info/class.tx_tstemplateinfo.php']['postOutputProcessingHook'];
379 if (is_array($postOutputProcessingHook)) {
380 $hookParameters = array(
381 'theOutput' => &$theOutput,
385 'numberOfRows' => $numberOfRows
387 foreach ($postOutputProcessingHook as $hookFunction) {
388 \TYPO3\CMS\Core\Utility\GeneralUtility
::callUserFunction($hookFunction, $hookParameters, $this);
393 $theOutput .= $this->pObj
->noTemplate(1);