protected function getSlideRecordsFromPage($pageUid, $limit) { $column = (int) $this->arguments['column']; $order = $this->arguments['order']; if (false === empty($order)) { $sortDirection = strtoupper(trim($this->arguments['sortDirection'])); if ('ASC' !== $sortDirection && 'DESC' !== $sortDirection) { $sortDirection = 'ASC'; } $order = $order . ' ' . $sortDirection; } $contentUids = $this->arguments['contentUids']; if (true === is_array($contentUids)) { $conditions = 'uid IN (' . implode(',', $contentUids) . ')'; } else { $hideUntranslated = (bool) $this->arguments['hideUntranslated']; $currentLanguage = $GLOBALS['TSFE']->sys_language_content; $languageCondition = '(sys_language_uid IN (-1,' . $currentLanguage . ')'; if (0 < $currentLanguage) { if (true === $hideUntranslated) { $languageCondition .= ' AND l18n_parent > 0'; } $nestedQuery = $GLOBALS['TYPO3_DB']->SELECTquery('l18n_parent', 'tt_content', 'sys_language_uid = ' . $currentLanguage . $GLOBALS['TSFE']->cObj->enableFields('tt_content')); $languageCondition .= ' AND uid NOT IN (' . $nestedQuery . ')'; } $languageCondition .= ')'; $conditions = "pid = '" . (int) $pageUid . "' AND colPos = '" . (int) $column . "'" . $GLOBALS['TSFE']->cObj->enableFields('tt_content') . ' AND ' . $languageCondition; } if (true === (bool) $this->arguments['sectionIndexOnly']) { $conditions .= ' AND sectionIndex = 1'; } $conditions .= ' AND t3ver_state <= 1'; $rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'tt_content', $conditions, '', $order, $limit); return $rows; }