2 namespace TYPO3\CMS\Frontend\ContentObject;
33 public function render($conf = array())
35 if (!empty($conf[
'if.']) && !$this->cObj->checkIf($conf[
'if.'])) {
41 $originalRec = $frontendController->currentRecord;
45 ++$frontendController->recordRegister[$originalRec];
47 $conf[
'table'] = isset($conf[
'table.']) ? trim($this->cObj->stdWrap($conf[
'table'], $conf[
'table.'])) : trim($conf[
'table']);
48 $renderObjName = $conf[
'renderObj'] ?:
'<' . $conf[
'table'];
49 $renderObjKey = $conf[
'renderObj'] ?
'renderObj' :
'';
50 $renderObjConf = $conf[
'renderObj.'];
51 $slide = isset($conf[
'slide.']) ? (int)$this->cObj->stdWrap($conf[
'slide'], $conf[
'slide.']) : (int)$conf[
'slide'];
55 $slideCollect = isset($conf[
'slide.'][
'collect.']) ? (int)$this->cObj->stdWrap($conf[
'slide.'][
'collect'], $conf[
'slide.'][
'collect.']) : (int)$conf[
'slide.'][
'collect'];
59 $slideCollectReverse = isset($conf[
'slide.'][
'collectReverse.']) ? (int)$this->cObj->stdWrap($conf[
'slide.'][
'collectReverse'], $conf[
'slide.'][
'collectReverse.']) : (int)$conf[
'slide.'][
'collectReverse'];
60 $slideCollectReverse = (bool)$slideCollectReverse;
61 $slideCollectFuzzy = isset($conf[
'slide.'][
'collectFuzzy.'])
62 ? (bool)$this->cObj->stdWrap($conf[
'slide.'][
'collectFuzzy'], $conf[
'slide.'][
'collectFuzzy.'])
63 : (bool)$conf[
'slide.'][
'collectFuzzy'];
65 $slideCollectFuzzy =
true;
72 $records = $this->cObj->getRecords($conf[
'table'], $conf[
'select.']);
73 if (!empty($records)) {
74 $this->cObj->currentRecordTotal = count($records);
75 $this->
getTimeTracker()->setTSlogMessage(
'NUMROWS: ' . count($records));
79 $cObj->setParent($this->cObj->data, $this->cObj->currentRecord);
80 $this->cObj->currentRecordNumber = 0;
83 foreach ($records as $row) {
85 if (is_array(
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
'tslib/class.tslib_content_content.php'][
'modifyDBRow'])) {
86 foreach (
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
'tslib/class.tslib_content_content.php'][
'modifyDBRow'] as $_classRef) {
88 $_procObj->modifyDBRow($row, $conf[
'table']);
91 if (!$frontendController->recordRegister[($conf[
'table'] .
':' . $row[
'uid'])]) {
92 $this->cObj->currentRecordNumber++;
93 $cObj->parentRecordNumber = $this->cObj->currentRecordNumber;
94 $frontendController->currentRecord = $conf[
'table'] .
':' . $row[
'uid'];
95 $this->cObj->lastChanged($row[
'tstamp']);
96 $cObj->start($row, $conf[
'table']);
97 $tmpValue =
$cObj->cObjGetSingle($renderObjName, $renderObjConf, $renderObjKey);
98 $cobjValue .= $tmpValue;
102 if ($slideCollectReverse) {
103 $theValue = $cobjValue . $theValue;
105 $theValue .= $cobjValue;
107 if ($slideCollect > 0) {
114 $conf[
'select.'][
'pidInList'] = $this->cObj->getSlidePids($conf[
'select.'][
'pidInList'], $conf[
'select.'][
'pidInList.']);
115 if (isset($conf[
'select.'][
'pidInList.'])) {
116 unset($conf[
'select.'][
'pidInList.']);
118 $again = (string)$conf[
'select.'][
'pidInList'] !==
'';
120 }
while ($again && $slide && ((
string)$tmpValue ===
'' && $slideCollectFuzzy || $slideCollect));
122 $wrap = isset($conf[
'wrap.']) ? $this->cObj->stdWrap($conf[
'wrap'], $conf[
'wrap.']) : $conf[
'wrap'];
124 $theValue = $this->cObj->wrap($theValue, $wrap);
126 if (isset($conf[
'stdWrap.'])) {
127 $theValue = $this->cObj->stdWrap($theValue, $conf[
'stdWrap.']);
130 $frontendController->currentRecord = $originalRec;
132 --$frontendController->recordRegister[$originalRec];