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