200 trigger_error(
'The class AbstractRecordList will be removed in TYPO3 v10.0, as all logic was moved into specific classes that inherited from AbstractRecordList.', E_USER_DEPRECATED);
201 if (isset(
$GLOBALS[
'BE_USER']->uc[
'titleLen']) &&
$GLOBALS[
'BE_USER']->uc[
'titleLen'] > 0) {
202 $this->fixedL =
$GLOBALS[
'BE_USER']->uc[
'titleLen'];
204 $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
215 if ($routePath = GeneralUtility::_GP(
'route')) {
216 $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
217 $this->thisScript = (string)$uriBuilder->buildUriFromRoutePath($routePath);
219 $this->thisScript = GeneralUtility::getIndpEnv(
'SCRIPT_NAME');
229 return strpos($this->thisScript,
'?') ===
false ? $this->thisScript .
'?' : $this->thisScript .
'&';
246 public function addElement($h, $icon, $data, $rowParams =
'', $_ =
'', $_2 =
'', $colType =
'td')
248 $colType = ($colType ===
'th') ?
'th' :
'td';
249 $noWrap = $this->no_noWrap ?
'' :
' nowrap';
251 $l10nParent = isset($data[
'_l10nparent_']) ? (int)$data[
'_l10nparent_'] : 0;
253 <!-- Element, begin: -->
254 <tr ' . $rowParams .
' data-uid="' . (int)$data[
'uid'] .
'" data-l10nparent="' . $l10nParent .
'">';
256 if ($this->showIcon) {
258 <' . $colType .
' class="col-icon nowrap">';
262 for ($a = 0; $a < $h; $a++) {
270 $out .=
'</' . $colType .
'>
281 if ($colType ===
'td' && array_key_exists(
'__label', $data)) {
286 if (isset($data[$vKey])) {
288 $cssClass = $this->addElement_tdCssClass[$lastKey];
289 if ($this->oddColumnsCssClass && $ccount % 2 == 0) {
290 $cssClass = implode(
' ', [$this->addElement_tdCssClass[$lastKey], $this->oddColumnsCssClass]);
293 <' . $colType .
' class="' . $cssClass . $noWrap .
'"' . $colsp . $this->addElement_tdParams[$lastKey] .
'>' . $data[$lastKey] .
'</' . $colType .
'>';
305 $colsp =
' colspan="' . $c .
'"';
311 $cssClass = $this->addElement_tdCssClass[$lastKey];
312 if ($this->oddColumnsCssClass) {
313 $cssClass = implode(
' ', [$this->addElement_tdCssClass[$lastKey], $this->oddColumnsCssClass]);
316 <' . $colType .
' class="' . $cssClass . $noWrap .
'"' . $colsp . $this->addElement_tdParams[$lastKey] .
'>' . $data[$lastKey] .
'</' . $colType .
'>';
343 if ($this->eCounter >= $this->firstElementNumber && $this->eCounter < $this->firstElementNumber + $this->iLimit) {
344 if ($this->firstElementNumber && $this->eCounter == $this->firstElementNumber) {
347 $titleCol = $this->fieldArray[0];
348 $theData[$titleCol] = $this->
fwd_rwd_HTML(
'fwd', $this->eCounter, $table);
349 $code = $this->
addElement(1,
'', $theData,
'class="fwd_rwd_nav"');
353 if ($this->eCounter == $this->firstElementNumber + $this->iLimit) {
356 $titleCol = $this->fieldArray[0];
357 $theData[$titleCol] = $this->
fwd_rwd_HTML(
'rwd', $this->eCounter, $table);
358 $code = $this->
addElement(1,
'', $theData,
'class="fwd_rwd_nav"');
376 $tParam = $table ?
'&table=' . rawurlencode($table) :
'';
380 $content =
'<a href="' . htmlspecialchars($href) .
'">' . $this->iconFactory->getIcon(
'actions-move-up',
Icon::SIZE_SMALL)->render() .
'</a> <i>[' . (max(0, $pointer - $this->iLimit) + 1) .
' - ' . $pointer .
']</i>';
383 $href = $this->
listURL() .
'&pointer=' . $pointer . $tParam;
384 $content =
'<a href="' . htmlspecialchars($href) .
'">' . $this->iconFactory->getIcon(
'actions-move-down',
Icon::SIZE_SMALL)->render() .
'</a> <i>[' . ($pointer + 1) .
' - ' . $this->totalItems .
']</i>';
399 public function listURL($altId =
'', $table =
'-1', $exclList =
'')
414 function checkOffCB(listOfCBnames, link) { //
415 var checkBoxes, flag, i;
416 var checkBoxes = listOfCBnames.split(",");
417 if (link.rel === "") {
418 link.rel = "allChecked";
424 for (i = 0; i < checkBoxes.length; i++) {
425 setcbValue(checkBoxes[i], flag);
429 function cbValue(CBname) { //
430 var CBfullName = "CBC["+CBname+"]";
431 return (document.dblistForm[CBfullName] && document.dblistForm[CBfullName].checked ? 1 : 0);
434 function setcbValue(CBname,flag) { //
435 CBfullName = "CBC["+CBname+"]";
436 if(document.dblistForm[CBfullName]) {
437 document.dblistForm[CBfullName].checked = flag ? "on" : 0;
451 $localizationParentField =
$GLOBALS[
'TCA'][
'pages'][
'ctrl'][
'transOrigPointerField'];
452 $languageField =
$GLOBALS[
'TCA'][
'pages'][
'ctrl'][
'languageField'];
453 $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
454 ->getQueryBuilderForTable(
'pages');
455 $queryBuilder->getRestrictions()
457 ->add(GeneralUtility::makeInstance(DeletedRestriction::class))
458 ->add(GeneralUtility::makeInstance(BackendWorkspaceRestriction::class));
459 $result = $queryBuilder
463 $queryBuilder->expr()->andX(
464 $queryBuilder->expr()->eq($localizationParentField, $queryBuilder->createNamedParameter($this->id, \PDO::PARAM_INT)),
465 $queryBuilder->expr()->gt($languageField, $queryBuilder->createNamedParameter(0, \PDO::PARAM_INT))
470 $this->pageOverlays = [];
471 while ($row = $result->fetch()) {
472 $this->pageOverlays[$row[$languageField]] = $row;
486 public function languageFlag($sys_language_uid, $addAsAdditionalText =
true)
489 $title = htmlspecialchars($this->languageIconTitles[$sys_language_uid][
'title']);
490 if ($this->languageIconTitles[$sys_language_uid][
'flagIcon']) {
491 $out .=
'<span title="' . $title .
'">' . $this->iconFactory->getIcon($this->languageIconTitles[$sys_language_uid][
'flagIcon'],
Icon::SIZE_SMALL)->render() .
'</span>';
492 if (!$addAsAdditionalText) {
509 if (!isset($this->translateTools)) {
510 $this->translateTools = GeneralUtility::makeInstance(TranslationConfigurationProvider::class);
529 $htmlCode =
'<a href="#"';
530 if ($launchViewParameter !==
'') {
531 $htmlCode .=
' onclick="' . htmlspecialchars(
'top.TYPO3.InfoWindow.showItem(' . $launchViewParameter .
'); return false;') .
'"';
533 $htmlCode .=
' title="' . htmlspecialchars($this->
getLanguageService()->sL(
'LLL:EXT:backend/Resources/Private/Language/locallang.xlf:show_references') .
' (' . $references .
')') .
'">';
534 $htmlCode .= $references;