2 namespace TYPO3\CMS\Fluid\ViewHelpers\Be;
74 public function render($tableName, array $fieldList = array(), $storagePid = null, $levels = 0, $filter =
'', $recordsPerPage = 0, $sortField =
'', $sortDescending =
false, $readOnly =
false, $enableClickMenu =
true, $clickTitleMode = null, $alternateBackgroundColors =
false)
76 if ($alternateBackgroundColors) {
77 \TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog(
78 'The option alternateBackgroundColors has no effect anymore and can be removed without problems. The parameter will be removed in TYPO3 CMS 8.'
82 $pageinfo = \TYPO3\CMS\Backend\Utility\BackendUtility::readPageAccess(\TYPO3\CMS\Core\Utility\
GeneralUtility::_GP(
'id'),
$GLOBALS[
'BE_USER']->getPagePermsClause(1));
84 $dblist = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList::class);
85 $dblist->pageRow = $pageinfo;
86 if ($readOnly ===
false) {
87 $dblist->calcPerms =
$GLOBALS[
'BE_USER']->calcPerms($pageinfo);
89 $dblist->showClipboard =
false;
90 $dblist->disableSingleTableView =
true;
91 $dblist->clickTitleMode = $clickTitleMode;
92 $dblist->clickMenuEnabled = $enableClickMenu;
93 if ($storagePid === null) {
94 $frameworkConfiguration = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
95 $storagePid = $frameworkConfiguration[
'persistence'][
'storagePid'];
97 $dblist->start($storagePid, $tableName, (
int)\TYPO3\CMS\Core\Utility\
GeneralUtility::_GP(
'pointer'), $filter, $levels, $recordsPerPage);
98 $dblist->allFields =
true;
99 $dblist->dontShowClipControlPanels =
true;
100 $dblist->displayFields =
false;
101 $dblist->setFields = array($tableName => $fieldList);
102 $dblist->noControlPanels =
true;
103 $dblist->sortField = $sortField;
104 $dblist->sortRev = $sortDescending;
105 $dblist->script = $_SERVER[
'REQUEST_URI'];
106 $dblist->generateList();
107 return $dblist->HTMLcode;