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