You are here

function archiver_get_extensions in Drupal 8

Same name and namespace in other branches
  1. 7 includes/common.inc \archiver_get_extensions()

Returns a string of supported archive extensions.

Return value

string A space-separated string of extensions suitable for use by the file validation system.

Deprecated

in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Archiver\ArchiverManager::getExtensions() instead.

See also

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

1 call to archiver_get_extensions()
LegacyFunctionsTest::testArchiverGetExtensions in core/tests/Drupal/KernelTests/Core/Common/LegacyFunctionsTest.php
@expectedDeprecation archiver_get_extensions() is deprecated in Drupal 8.8.0 and will be removed in Drupal 9.0.0. Use \Drupal\Core\Archiver\ArchiverManager::getExtensions() instead. See https://www.drupal.org/node/2999951

File

core/includes/common.inc, line 1177
Common functions that many Drupal modules will need to reference.

Code

function archiver_get_extensions() {
  @trigger_error('archiver_get_extensions() is deprecated in Drupal 8.8.0 and will be removed in Drupal 9.0.0. Use \\Drupal\\Core\\Archiver\\ArchiverManager::getExtensions() instead. See https://www.drupal.org/node/2999951', E_USER_DEPRECATED);
  return \Drupal::service('plugin.manager.archiver')
    ->getExtensions();
}