/** * Transforms a Resource from a database query to an array of rows. * * @param resource $result The result * @return array The result as an array of rows (tuples) */ protected function getRowsFromResult($result) { $rows = array(); while ($row = $this->databaseHandle->sql_fetch_assoc($result)) { if (is_array($row)) { // Get language uid from querySettings. // Ensure the backend handling is not broken (fallback to Get parameter 'L' if needed) $overlaidRow = $this->doLanguageAndWorkspaceOverlay($this->query->getSource(), $row, $this->query->getQuerySettings()); $contentObject = GeneralUtility::makeInstance($this->objectType, $this->query->getType(), $overlaidRow); $rows[] = $contentObject; } } return $rows; }