function _locale_translation_file_is_remote

Same name and namespace in other branches
  1. 10 core/modules/locale/locale.translation.inc \_locale_translation_file_is_remote()
  2. 11.x core/modules/locale/locale.translation.inc \_locale_translation_file_is_remote()
  3. 9 core/modules/locale/locale.translation.inc \_locale_translation_file_is_remote()
  4. 8.9.x core/modules/locale/locale.translation.inc \_locale_translation_file_is_remote()

Determine if a file is a remote file.

Parameters

string $uri: The URI or URI pattern of the file.

Return value

bool TRUE if the $uri is a remote file.

Deprecated

in drupal:11.4.0 and is removed from drupal:12.0.0. There is no replacement.

See also

https://www.drupal.org/node/3569330

File

core/modules/locale/locale.translation.inc, line 325

Code

function _locale_translation_file_is_remote($uri) {
  @trigger_error(__FUNCTION__ . '() is deprecated in drupal:11.4.0 and is removed from drupal:12.0.0. There is no replacement. See https://www.drupal.org/node/3569330', E_USER_DEPRECATED);
  $scheme = StreamWrapperManager::getScheme($uri);
  if ($scheme) {
    return !\Drupal::service('file_system')->realpath($scheme . '://');
  }
  return FALSE;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.