[TASK] Remove usage of property $new_unique_uid
[Packages/TYPO3.CMS.git] / typo3 / sysext / tstemplate / Classes / Controller / TypoScriptTemplateModuleController.php
1 <?php
2 namespace TYPO3\CMS\Tstemplate\Controller;
3
4 /*
5 * This file is part of the TYPO3 CMS project.
6 *
7 * It is free software; you can redistribute it and/or modify it under
8 * the terms of the GNU General Public License, either version 2
9 * of the License, or any later version.
10 *
11 * For the full copyright and license information, please read the
12 * LICENSE.txt file that was distributed with this source code.
13 *
14 * The TYPO3 project - inspiring people to share!
15 */
16
17 use TYPO3\CMS\Core\Utility\GeneralUtility;
18 use TYPO3\CMS\Backend\Utility\BackendUtility;
19 use TYPO3\CMS\Backend\Utility\IconUtility;
20
21 /**
22 * Module: TypoScript Tools
23 *
24 * $TYPO3_CONF_VARS["MODS"]["web_ts"]["onlineResourceDir"] = Directory of default resources. Eg. "fileadmin/res/" or so.
25 *
26 * @author Kasper Skårhøj <kasperYYYY@typo3.com>
27 */
28 class TypoScriptTemplateModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClass {
29
30 /**
31 * @var string
32 */
33 public $perms_clause;
34
35 /**
36 * @var string
37 */
38 public $e;
39
40 /**
41 * @var string
42 */
43 public $sObj;
44
45 /**
46 * @var string
47 */
48 public $edit;
49
50 /**
51 * @var string
52 */
53 public $textExtensions = 'html,htm,txt,css,tmpl,inc,js';
54
55 /**
56 * @var string
57 */
58 public $modMenu_type = '';
59
60 /**
61 * @var string
62 */
63 public $modMenu_dontValidateList = '';
64
65 /**
66 * @var string
67 */
68 public $modMenu_setDefaultList = '';
69
70 /**
71 * @var array
72 */
73 public $pageinfo = array();
74
75 /**
76 * @var bool
77 */
78 public $access = FALSE;
79
80 /**
81 * The name of the module
82 *
83 * @var string
84 */
85 protected $moduleName = 'web_ts';
86
87 /**
88 * Constructor
89 */
90 public function __construct() {
91 $GLOBALS['LANG']->includeLLFile('EXT:tstemplate/ts/locallang.xlf');
92
93 $this->MCONF = array(
94 'name' => $this->moduleName
95 );
96 }
97
98 /**
99 * Init
100 *
101 * @return void
102 */
103 public function init() {
104 parent::init();
105 $this->id = (int)GeneralUtility::_GP('id');
106 $this->e = GeneralUtility::_GP('e');
107 $this->sObj = GeneralUtility::_GP('sObj');
108 $this->edit = GeneralUtility::_GP('edit');
109 $this->perms_clause = $GLOBALS['BE_USER']->getPagePermsClause(1);
110 }
111
112 /**
113 * Clear cache
114 *
115 * @return void
116 */
117 public function clearCache() {
118 if (GeneralUtility::_GP('clear_all_cache')) {
119 $tce = GeneralUtility::makeInstance(\TYPO3\CMS\Core\DataHandling\DataHandler::class);
120 /** @var $tce \TYPO3\CMS\Core\DataHandling\DataHandler */
121 $tce->stripslashes_values = 0;
122 $tce->start(array(), array());
123 $tce->clear_cacheCmd('all');
124 }
125 }
126
127 /**
128 * Main
129 *
130 * @return void
131 */
132 public function main() {
133 // Template markers
134 $markers = array(
135 'CSH' => '',
136 'FUNC_MENU' => '',
137 'CONTENT' => ''
138 );
139
140 // Access check...
141 // The page will show only if there is a valid page and if this page may be viewed by the user
142 $this->pageinfo = BackendUtility::readPageAccess($this->id, $this->perms_clause);
143 $this->access = is_array($this->pageinfo);
144
145 /** @var \TYPO3\CMS\Backend\Template\DocumentTemplate doc */
146 $this->doc = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Template\DocumentTemplate::class);
147 $this->doc->backPath = $GLOBALS['BACK_PATH'];
148 $this->doc->setModuleTemplate('EXT:tstemplate/Resources/Private/Templates/tstemplate.html');
149 $this->doc->addStyleSheet('module', 'sysext/tstemplate/Resources/Public/Styles/styles.css');
150
151 if ($this->id && $this->access) {
152 $urlParameters = array(
153 'id' => $this->id,
154 'template' => 'all'
155 );
156 $aHref = BackendUtility::getModuleUrl('web_ts', $urlParameters);
157 $this->doc->form = '<form action="' . htmlspecialchars($aHref) . '" method="post" enctype="' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['form_enctype'] . '" name="editForm">';
158
159 // JavaScript
160 $this->doc->JScode = '
161 <script language="javascript" type="text/javascript">
162 function uFormUrl(aname) {
163 document.forms[0].action = ' . GeneralUtility::quoteJSvalue(($aHref . '#'), TRUE) . '+aname;
164 }
165 function brPoint(lnumber,t) {
166 window.location.href = ' . GeneralUtility::quoteJSvalue(($aHref . '&SET[function]=TYPO3\\CMS\\Tstemplate\\Controller\\TypoScriptTemplateObjectBrowserModuleFunctionController&SET[ts_browser_type]='), TRUE) . '+(t?"setup":"const")+"&breakPointLN="+lnumber;
167 return false;
168 }
169 </script>
170 ';
171 $this->doc->postCode = '
172 <script language="javascript" type="text/javascript">
173 if (top.fsMod) top.fsMod.recentIds["web"] = ' . $this->id . ';
174 </script>
175 ';
176 $this->doc->inDocStylesArray[] = '
177 TABLE#typo3-objectBrowser { width: 100%; margin-bottom: 24px; }
178 TABLE#typo3-objectBrowser A { text-decoration: none; }
179 TABLE#typo3-objectBrowser .comment { color: maroon; font-weight: bold; }
180 .ts-typoscript { width: 100%; }
181 .tsob-menu-row2 {margin-top: 10px;}
182 .tsob-search-submit {margin-left: 3px; margin-right: 3px;}
183 .tst-analyzer-options { margin:5px 0; }
184 ';
185 // Setting up the context sensitive menu:
186 $this->doc->getContextMenuCode();
187 // Build the modulle content
188 $this->content = $this->doc->header($GLOBALS['LANG']->getLL('moduleTitle'));
189 $this->extObjContent();
190 // Setting up the buttons and markers for docheader
191 $docHeaderButtons = $this->getButtons();
192 $markers['FUNC_MENU'] = BackendUtility::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']);
193 $markers['CONTENT'] = $this->content;
194 } else {
195 // Template pages:
196 $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('pages.uid, count(*) AS count, max(sys_template.root) AS root_max_val, min(sys_template.root) AS root_min_val', 'pages,sys_template', 'pages.uid=sys_template.pid' . BackendUtility::deleteClause('pages') . BackendUtility::versioningPlaceholderClause('pages') . BackendUtility::deleteClause('sys_template') . BackendUtility::versioningPlaceholderClause('sys_template'), 'pages.uid');
197 $templateArray = array();
198 $pArray = array();
199 while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
200 $this->setInPageArray($pArray, BackendUtility::BEgetRootLine($row['uid'], 'AND 1=1'), $row);
201 }
202 $GLOBALS['TYPO3_DB']->sql_free_result($res);
203
204 $table = '<div class="table-fit"><table class="t3-table" id="ts-overview">' .
205 '<thead>' .
206 '<tr>' .
207 '<th>' . $GLOBALS['LANG']->getLL('pageName') . '</th>' .
208 '<th>' . $GLOBALS['LANG']->getLL('templates') . '</th>' .
209 '<th>' . $GLOBALS['LANG']->getLL('isRoot') . '</th>' .
210 '<th>' . $GLOBALS['LANG']->getLL('isExt') . '</th>' .
211 '</tr>' .
212 '</thead>' .
213 '<tbody>' . implode('', $this->renderList($pArray)) . '</tbody>' .
214 '</table></div>';
215
216 $this->content = $this->doc->header($GLOBALS['LANG']->getLL('moduleTitle'));
217 $this->content .= $this->doc->section('', '<p class="lead">' . $GLOBALS['LANG']->getLL('overview') . '</p>' . $table);
218
219 // RENDER LIST of pages with templates, END
220 // Setting up the buttons and markers for docheader
221 $docHeaderButtons = $this->getButtons();
222 $markers['CONTENT'] = $this->content;
223 }
224
225 // Build the <body> for the module
226 $this->content = $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
227 // Renders the module page
228 $this->content = $this->doc->render('Template Tools', $this->content);
229 }
230
231 /**
232 * Print content
233 *
234 * @return void
235 */
236 public function printContent() {
237 echo $this->content;
238 }
239
240 /**
241 * Create the panel of buttons for submitting the form or otherwise perform operations.
242 *
243 * @return array All available buttons as an assoc. array
244 */
245 protected function getButtons() {
246 $buttons = array(
247 'back' => '',
248 'close' => '',
249 'new' => '',
250 'save' => '',
251 'save_close' => '',
252 'view' => '',
253 'shortcut' => ''
254 );
255
256 if ($this->id && $this->access) {
257 // View page
258 $buttons['view'] = '<a href="#" onclick="' . htmlspecialchars(BackendUtility::viewOnClick($this->pageinfo['uid'], $GLOBALS['BACK_PATH'], BackendUtility::BEgetRootLine($this->pageinfo['uid']))) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.showPage', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-view') . '</a>';
259 if ($this->extClassConf['name'] == \TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateInformationModuleFunctionController::class) {
260 // NEW button
261 $urlParameters = array(
262 'id' => $this->id,
263 'template' => 'all',
264 'createExtension' => 'new'
265 );
266 $buttons['new'] = '<a href="' . htmlspecialchars(BackendUtility::getModuleUrl('web_ts', $urlParameters)) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:db_new.php.pagetitle', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-new') . '</a>';
267 if (!empty($this->e) && !GeneralUtility::_POST('saveclose')) {
268 // no NEW-button while edit
269 $buttons['new'] = '';
270 // SAVE button
271 $buttons['save'] = IconUtility::getSpriteIcon('actions-document-save', array(
272 'html' => '<input type="image" class="c-inputButton" name="submit" src="clear.gif" ' . 'title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveDoc', TRUE) . '" ' . 'value="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveDoc', TRUE) . '" ' . '/>'
273 ));
274 // SAVE AND CLOSE button
275 $buttons['save_close'] = IconUtility::getSpriteIcon('actions-document-save-close', array(
276 'html' => '<input type="image" class="c-inputButton" name="saveclose" src="clear.gif" ' . 'title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveCloseDoc', TRUE) . '" ' . 'value="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveCloseDoc', TRUE) . '" ' . '/>'
277 ));
278 // CLOSE button
279 $url = BackendUtility::getModuleUrl('web_ts', array('id' => $this->id));
280 $buttons['close'] = '<a href="' . htmlspecialchars($url) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:rm.closeDoc', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-close') .'</a>';
281 }
282 } elseif ($this->extClassConf['name'] === \TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateConstantEditorModuleFunctionController::class && count($this->MOD_MENU['constant_editor_cat'])) {
283 // SAVE button
284 $buttons['save'] = IconUtility::getSpriteIcon('actions-document-save', array('html' => '<input type="image" class="c-inputButton" name="submit" src="clear.gif" ' . 'title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveDoc', TRUE) . '" ' . 'value="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveDoc', TRUE) . '" ' . '/>'));
285 } elseif ($this->extClassConf['name'] === \TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateObjectBrowserModuleFunctionController::class) {
286 if (!empty($this->sObj)) {
287 // BACK
288 $urlParameters = array(
289 'id' => $this->id
290 );
291 $aHref = BackendUtility::getModuleUrl('web_ts', $urlParameters);
292 $buttons['back'] = '<a href="' . htmlspecialchars($aHref) . '" class="typo3-goBack" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.goBack', TRUE) . '">' . IconUtility::getSpriteIcon('actions-view-go-back') . '</a>';
293 }
294 }
295 // Shortcut
296 if ($GLOBALS['BE_USER']->mayMakeShortcut()) {
297 $buttons['shortcut'] = $this->doc->makeShortcutIcon('id, edit_record, pointer, search_field, search_levels, showLimit', implode(',', array_keys($this->MOD_MENU)), $this->MCONF['name']);
298 }
299 } else {
300 // Shortcut
301 if ($GLOBALS['BE_USER']->mayMakeShortcut()) {
302 $buttons['shortcut'] = $this->doc->makeShortcutIcon('id', '', $this->MCONF['name']);
303 }
304 }
305 return $buttons;
306 }
307
308 // OTHER FUNCTIONS:
309 /**
310 * Wrap title for link in template
311 *
312 * @param string $title
313 * @param string $onlyKey
314 * @return string
315 */
316 public function linkWrapTemplateTitle($title, $onlyKey = '') {
317 $urlParameters = array(
318 'id' => $this->id
319 );
320 $aHref = BackendUtility::getModuleUrl('web_ts', $urlParameters);
321 if ($onlyKey) {
322 $title = '<a href="' . htmlspecialchars(($aHref . '&e[' . $onlyKey . ']=1&SET[function]=TYPO3\\CMS\\Tstemplate\\Controller\\TypoScriptTemplateInformationModuleFunctionController')) . '">' . htmlspecialchars($title) . '</a>';
323 } else {
324 $title = '<a href="' . htmlspecialchars(($aHref . '&e[constants]=1&e[config]=1&SET[function]=TYPO3\\CMS\\Tstemplate\\Controller\\TypoScriptTemplateInformationModuleFunctionController')) . '">' . htmlspecialchars($title) . '</a>';
325 }
326 return $title;
327 }
328
329 /**
330 * No template
331 *
332 * @param int $newStandardTemplate
333 * @return string
334 */
335 public function noTemplate($newStandardTemplate = 0) {
336 // Defined global here!
337 $tmpl = GeneralUtility::makeInstance(\TYPO3\CMS\Core\TypoScript\ExtendedTemplateService::class);
338 /** @var $tmpl \TYPO3\CMS\Core\TypoScript\ExtendedTemplateService */
339 // Do not log time-performance information
340 $tmpl->tt_track = FALSE;
341 $tmpl->init();
342 $theOutput = '';
343 $flashMessage = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Messaging\FlashMessage::class, $GLOBALS['LANG']->getLL('noTemplateDescription') . '<br />' . $GLOBALS['LANG']->getLL('createTemplateToEditConfiguration'), $GLOBALS['LANG']->getLL('noTemplate'), \TYPO3\CMS\Core\Messaging\FlashMessage::INFO);
344 $theOutput .= $flashMessage->render();
345 // New standard?
346 if ($newStandardTemplate) {
347 // Hook to change output, implemented for statictemplates
348 if (isset(
349 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][\TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController::class]['newStandardTemplateView']
350 )) {
351 $selector = '';
352 $staticsText = '';
353 $reference = array(
354 'selectorHtml' => &$selector,
355 'staticsText' => &$staticsText
356 );
357 GeneralUtility::callUserFunction(
358 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][\TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController::class]['newStandardTemplateView'],
359 $reference,
360 $this
361 );
362 $selector = $reference['selectorHtml'];
363 $staticsText = $reference['staticsText'];
364 } else {
365 $selector = '<input type="hidden" name="createStandard" value="" />';
366 $staticsText = '';
367 }
368 // Extension?
369 $theOutput .= $this->doc->section($GLOBALS['LANG']->getLL('newWebsite') . $staticsText, $GLOBALS['LANG']->getLL('newWebsiteDescription') . '<br /><br />' . $selector . '<input type="Submit" name="newWebsite" value="' . $GLOBALS['LANG']->getLL('newWebsiteAction') . '" />', 0, 1);
370 }
371 // Extension?
372 $theOutput .= $this->doc->spacer(10);
373 $theOutput .= $this->doc->section($GLOBALS['LANG']->getLL('extTemplate'), $GLOBALS['LANG']->getLL('extTemplateDescription') . '<br /><br />' . '<input type="submit" name="createExtension" value="' . $GLOBALS['LANG']->getLL('extTemplateAction') . '" />', 0, 1);
374 // Go to first appearing...
375 $first = $tmpl->ext_prevPageWithTemplate($this->id, $this->perms_clause);
376 if ($first) {
377 $theOutput .= $this->doc->spacer(10);
378 $urlParameters = array(
379 'id' => $first['uid']
380 );
381 $aHref = BackendUtility::getModuleUrl('web_ts', $urlParameters);
382 $theOutput .= $this->doc->section($GLOBALS['LANG']->getLL('goToClosest'), sprintf($GLOBALS['LANG']->getLL('goToClosestDescription') . '<br /><br />%s<strong>' . $GLOBALS['LANG']->getLL('goToClosestAction') . '</strong>%s', htmlspecialchars($first['title']), $first['uid'], '<a href="' . htmlspecialchars($aHref) . '">', '</a>'), 0, 1);
383 }
384 return $theOutput;
385 }
386
387 public function templateMenu() {
388 // Defined global here!
389 $tmpl = GeneralUtility::makeInstance(\TYPO3\CMS\Core\TypoScript\ExtendedTemplateService::class);
390 /** @var $tmpl \TYPO3\CMS\Core\TypoScript\ExtendedTemplateService */
391 // Do not log time-performance information
392 $tmpl->tt_track = FALSE;
393 $tmpl->init();
394 $all = $tmpl->ext_getAllTemplates($this->id, $this->perms_clause);
395 $menu = '';
396 if (count($all) > 1) {
397 $this->MOD_MENU['templatesOnPage'] = array();
398 foreach ($all as $d) {
399 $this->MOD_MENU['templatesOnPage'][$d['uid']] = $d['title'];
400 }
401 }
402 $this->MOD_SETTINGS = BackendUtility::getModuleData($this->MOD_MENU, GeneralUtility::_GP('SET'), $this->MCONF['name'], $this->modMenu_type, $this->modMenu_dontValidateList, $this->modMenu_setDefaultList);
403 $menu = BackendUtility::getFuncMenu($this->id, 'SET[templatesOnPage]', $this->MOD_SETTINGS['templatesOnPage'], $this->MOD_MENU['templatesOnPage']);
404 return $menu;
405 }
406
407 /**
408 * Create template
409 *
410 * @param int $id
411 * @param int $actTemplateId
412 * @return string
413 */
414 public function createTemplate($id, $actTemplateId = 0) {
415 if (GeneralUtility::_GP('createExtension') || GeneralUtility::_GP('createExtension_x')) {
416 $tce = GeneralUtility::makeInstance(\TYPO3\CMS\Core\DataHandling\DataHandler::class);
417 /** @var $tce \TYPO3\CMS\Core\DataHandling\DataHandler */
418 $tce->stripslashes_values = 0;
419 $recData = array();
420 $recData['sys_template']['NEW'] = array(
421 'pid' => $actTemplateId ? -1 * $actTemplateId : $id,
422 'title' => '+ext'
423 );
424 $tce->start($recData, array());
425 $tce->process_datamap();
426 return $tce->substNEWwithIDs['NEW'];
427 } elseif (GeneralUtility::_GP('newWebsite')) {
428 $tce = GeneralUtility::makeInstance(\TYPO3\CMS\Core\DataHandling\DataHandler::class);
429 /** @var $tce \TYPO3\CMS\Core\DataHandling\DataHandler */
430 $tce->stripslashes_values = 0;
431 $recData = array();
432 // Hook to handle row data, implemented for statictemplates
433 if (isset(
434 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][\TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController::class]['newStandardTemplateHandler']
435 )) {
436 $reference = array(
437 'recData' => &$recData,
438 'id' => $id,
439 );
440 GeneralUtility::callUserFunction(
441 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][\TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController::class]['newStandardTemplateHandler'],
442 $reference,
443 $this
444 );
445 $recData = $reference['recData'];
446 } else {
447 $recData['sys_template']['NEW'] = array(
448 'pid' => $id,
449 'title' => $GLOBALS['LANG']->getLL('titleNewSite'),
450 'sorting' => 0,
451 'root' => 1,
452 'clear' => 3,
453 'config' => '
454 # Default PAGE object:
455 page = PAGE
456 page.10 = TEXT
457 page.10.value = HELLO WORLD!
458 '
459 );
460 }
461 $tce->start($recData, array());
462 $tce->process_datamap();
463 $tce->clear_cacheCmd('all');
464 }
465 }
466
467 // RENDER LIST of pages with templates, BEGIN
468 /**
469 * Set page in array
470 *
471 * @param array $pArray
472 * @param array $rlArr
473 * @param array $row
474 * @return void
475 */
476 public function setInPageArray(&$pArray, $rlArr, $row) {
477 ksort($rlArr);
478 reset($rlArr);
479 if (!$rlArr[0]['uid']) {
480 array_shift($rlArr);
481 }
482 $cEl = current($rlArr);
483 $pArray[$cEl['uid']] = htmlspecialchars($cEl['title']);
484 array_shift($rlArr);
485 if (count($rlArr)) {
486 if (!isset($pArray[($cEl['uid'] . '.')])) {
487 $pArray[$cEl['uid'] . '.'] = array();
488 }
489 $this->setInPageArray($pArray[$cEl['uid'] . '.'], $rlArr, $row);
490 } else {
491 $pArray[$cEl['uid'] . '_'] = $row;
492 }
493 }
494
495 /**
496 * Render the list
497 *
498 * @param array $pArray
499 * @param array $lines
500 * @param int $c
501 * @return array
502 */
503 public function renderList($pArray, $lines = array(), $c = 0) {
504 if (is_array($pArray)) {
505 reset($pArray);
506 static $i;
507 foreach ($pArray as $k => $v) {
508 if (\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($k)) {
509 if (isset($pArray[$k . '_'])) {
510 $lines[] = '<tr class="' . ($i++ % 2 == 0 ? 'bgColor4' : 'bgColor6') . '">
511 <td nowrap><img src="clear.gif" width="1" height="1" hspace=' . $c * 10 . ' align="top">' . '<a href="' . htmlspecialchars(GeneralUtility::linkThisScript(array('id' => $k))) . '">' . IconUtility::getSpriteIconForRecord('pages', BackendUtility::getRecordWSOL('pages', $k), array('title' => ('ID: ' . $k))) . GeneralUtility::fixed_lgd_cs($pArray[$k], 30) . '</a></td>
512 <td>' . $pArray[($k . '_')]['count'] . '</td>
513 <td>' . ($pArray[$k . '_']['root_max_val'] > 0 ? IconUtility::getSpriteIcon('status-status-checked') : '&nbsp;') . '</td>
514 <td>' . ($pArray[$k . '_']['root_min_val'] == 0 ? IconUtility::getSpriteIcon('status-status-checked') : '&nbsp;') . '</td>
515 </tr>';
516 } else {
517 $lines[] = '<tr class="' . ($i++ % 2 == 0 ? 'bgColor4' : 'bgColor6') . '">
518 <td nowrap ><img src="clear.gif" width="1" height="1" hspace=' . $c * 10 . ' align=top>' . IconUtility::getSpriteIconForRecord('pages', BackendUtility::getRecordWSOL('pages', $k)) . GeneralUtility::fixed_lgd_cs($pArray[$k], 30) . '</td>
519 <td></td>
520 <td></td>
521 <td></td>
522 </tr>';
523 }
524 $lines = $this->renderList($pArray[$k . '.'], $lines, $c + 1);
525 }
526 }
527 }
528 return $lines;
529 }
530
531 }