cObj->checkIf($conf['if.'])) { return ''; } $theValue = ''; $conf['table'] = trim((string)$this->cObj->stdWrapValue('table', $conf)); $conf['select.'] = !empty($conf['select.']) ? $conf['select.'] : []; $renderObjName = ($conf['renderObj'] ?? false) ? $conf['renderObj'] : '<' . $conf['table']; $renderObjKey = ($conf['renderObj'] ?? false) ? 'renderObj' : ''; $renderObjConf = $conf['renderObj.'] ?? []; $slide = (int)$this->cObj->stdWrapValue('slide', $conf); if (!$slide) { $slide = 0; } $slideCollect = (int)$this->cObj->stdWrapValue('collect', $conf['slide.'] ?? []); if (!$slideCollect) { $slideCollect = 0; } $slideCollectReverse = (bool)$this->cObj->stdWrapValue('collectReverse', $conf['slide.'] ?? []); $slideCollectFuzzy = (bool)$this->cObj->stdWrapValue('collectFuzzy', $conf['slide.'] ?? []); if (!$slideCollect) { $slideCollectFuzzy = true; } $again = false; $tmpValue = ''; do { $cobjValue = ''; $modifyRecordsEvent = $this->eventDispatcher->dispatch( new ModifyRecordsAfterFetchingContentEvent( $this->cObj->getRecords($conf['table'], $conf['select.']), $theValue, $slide, $slideCollect, $slideCollectReverse, $slideCollectFuzzy, $conf ) ); $records = $modifyRecordsEvent->getRecords(); $theValue = $modifyRecordsEvent->getFinalContent(); $slide = $modifyRecordsEvent->getSlide(); $slideCollect = $modifyRecordsEvent->getSlideCollect(); $slideCollectReverse = $modifyRecordsEvent->getSlideCollectReverse(); $slideCollectFuzzy = $modifyRecordsEvent->getSlideCollectFuzzy(); $conf = $modifyRecordsEvent->getConfiguration(); if ($records !== []) { $this->timeTracker->setTSlogMessage('NUMROWS: ' . count($records)); $cObj = GeneralUtility::makeInstance(ContentObjectRenderer::class); $cObj->setParent($this->cObj->data, $this->cObj->currentRecord); foreach ($records as $row) { $this->cObj->lastChanged($row['tstamp'] ?? 0); $cObj->setRequest($this->request); $cObj->start($row, $conf['table']); $tmpValue = $cObj->cObjGetSingle($renderObjName, $renderObjConf, $renderObjKey); $cobjValue .= $tmpValue; } } if ($slideCollectReverse) { $theValue = $cobjValue . $theValue; } else { $theValue .= $cobjValue; } if ($slideCollect > 0) { $slideCollect--; } if ($slide) { if ($slide > 0) { $slide--; } $conf['select.']['pidInList'] = $this->cObj->getSlidePids( $conf['select.']['pidInList'] ?? '', $conf['select.']['pidInList.'] ?? [], ); if (isset($conf['select.']['pidInList.'])) { unset($conf['select.']['pidInList.']); } $again = (string)$conf['select.']['pidInList'] !== ''; } } while ($again && $slide && ((string)$tmpValue === '' && $slideCollectFuzzy || $slideCollect)); $wrap = $this->cObj->stdWrapValue('wrap', $conf); if ($wrap) { $theValue = $this->cObj->wrap($theValue, $wrap); } if (isset($conf['stdWrap.'])) { $theValue = $this->cObj->stdWrap($theValue, $conf['stdWrap.']); } return $theValue; } }