protected function getLocalizedFileReference(string $table, string $field) {
    if ($this->getSysLanguageUid() > 0) {
      $localizedFileReferences = $this->getLocalizedFileReferences($table, $field);

      if (!empty($localizedFileReferences)) {
        $localizedFileObject = $localizedFileReferences[0]->toArray();

        if ($localizedFileObject) {
          $pid = intval($localizedFileObject['pid']);
          $uid = intval($localizedFileObject['uid']);

          $fileReference                = new FileReference();
          $fileReference->pid           = $pid;
          $fileReference->uid           = $uid;
          $fileReference->_languageUid  = 0;
          $fileReference->_localizedUid = $uid;
          $fileReference->_versionedUid = $uid;

          return $fileReference;
        }
      }
    }

    return null;
  }
protected function getLocalizedFileReference(string $table, string $field) {
    if ($this->getSysLanguageUid() > 0) {
      $localizedFileReferences = $this->getLocalizedFileReferences($table, $field);

      if (!empty($localizedFileReferences)) {
        $localizedFileObject = $localizedFileReferences[0]->toArray();

        if ($localizedFileObject) {
          $pid = intval($localizedFileObject['pid']);
          $uid = intval($localizedFileObject['uid']);

          $fileReference                = new FileReference();
          $fileReference->pid           = $pid;
          $fileReference->uid           = $uid;
          $fileReference->_languageUid  = 0;
          $fileReference->_localizedUid = $uid;
          $fileReference->_versionedUid = $uid;

          return $fileReference;
        }
      }
    }

    return null;
  }
protected function getLocalizedFileReference ( string $ table , string $ field ) { if ( $ this -> getSysLanguageUid ( ) > 0 ) { $ localizedFileReferences = $ this -> getLocalizedFileReferences ( $ table , $ field ) ; if ( ! empty ( $ localizedFileReferences ) ) { $ localizedFileObject = $ localizedFileReferences [ 0 ] -> toArray ( ) ; if ( $ localizedFileObject ) { $ pid = intval ( $ localizedFileObject [ 'pid' ] ) ; $ uid = intval ( $ localizedFileObject [ 'uid' ] ) ; $ fileReference = new FileReference ( ) ; $ fileReference -> pid = $ pid ; $ fileReference -> uid = $ uid ; $ fileReference -> _languageUid = 0 ; $ fileReference -> _localizedUid = $ uid ; $ fileReference -> _versionedUid = $ uid ; return $ fileReference ; } } } return null ; }
Gets a localized file reference.

@param string $table The table
@param string $field The field
@return array|null The localized file reference or null if no localized file reference was found
Gets a localized file reference .