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