public function getUidOfOverlay($table, $field, $uid)
    {
        // when no language is set at all we do not need to overlay
        if (!isset($this->tsfe->sys_language_uid)) {
            return $uid;
        }
        // when no language is set we can return the passed recordUid
        if (!$this->tsfe->sys_language_uid > 0) {
            return $uid;
        }

        $record = $this->getRecord($table, $uid);

        // when the overlay is not an array, we return the localRecordUid
        if (!is_array($record)) {
            return $uid;
        }

        $overlayUid = $this->getLocalRecordUidFromOverlay($table, $record);
        $uid = ($overlayUid !== 0) ? $overlayUid : $uid;
        return $uid;
    }
public function getUidOfOverlay($table, $field, $uid)
    {
        // when no language is set at all we do not need to overlay
        if (!isset($this->tsfe->sys_language_uid)) {
            return $uid;
        }
        // when no language is set we can return the passed recordUid
        if (!$this->tsfe->sys_language_uid > 0) {
            return $uid;
        }

        $record = $this->getRecord($table, $uid);

        // when the overlay is not an array, we return the localRecordUid
        if (!is_array($record)) {
            return $uid;
        }

        $overlayUid = $this->getLocalRecordUidFromOverlay($table, $record);
        $uid = ($overlayUid !== 0) ? $overlayUid : $uid;
        return $uid;
    }
public function getUidOfOverlay ( $ table , $ field , $ uid ) { // when no language is set at all we do not need to overlay if ( ! isset ( $ this -> tsfe -> sys_language_uid ) ) { return $ uid ; } // when no language is set we can return the passed recordUid if ( ! $ this -> tsfe -> sys_language_uid > 0 ) { return $ uid ; } $ record = $ this -> getRecord ( $ table , $ uid ) ; // when the overlay is not an array, we return the localRecordUid if ( ! is_array ( $ record ) ) { return $ uid ; } $ overlayUid = $ this -> getLocalRecordUidFromOverlay ( $ table , $ record ) ; $ uid = ( $ overlayUid !== 0 ) ? $ overlayUid : $ uid ; return $ uid ; }
When the record has an overlay we retrieve the uid of the translated record,
to resolve the relations from the translation.

@param string $table
@param string $field
@param int $uid
@return int
When the record has an overlay we retrieve the uid of the translated record to resolve the relations from the translation .