getRecordFromDatabase($result['tableName'], (int)abs($vanillaUid)); if (!empty($neighborRow['t3ver_oid'])) { $neighborRow = $this->getRecordFromDatabase($result['tableName'], (int)$neighborRow['t3ver_oid']); } $result['neighborRow'] = $neighborRow; // uid of page the record is located in $neighborRowPid = (int)$neighborRow['pid']; if ($neighborRowPid !== 0) { // Fetch the parent page record only if it is not the '0' root $parentPageRow = $this->getRecordFromDatabase('pages', $neighborRowPid); } } elseif ($vanillaUid > 0) { // vanillaUid points to a page uid directly $parentPageRow = $this->getRecordFromDatabase('pages', $vanillaUid); } } } elseif ($result['databaseRow']['pid'] > 0) { // On "edit", the row itself has been fetched already $parentPageRow = $this->getRecordFromDatabase('pages', (int)$result['databaseRow']['pid']); } $result['parentPageRow'] = $parentPageRow; return $result; } }