Same name and namespace in other branches
  1. 8.9.x core/modules/migrate/src/MigrateExecutable.php \Drupal\migrate\MigrateExecutable::formatSize()
  2. 9 core/modules/migrate/src/MigrateExecutable.php \Drupal\migrate\MigrateExecutable::formatSize()

Generates a string representation for the given byte count.

Parameters

int $size: A size in bytes.

Return value

string A translated string representation of the size.

Deprecated

in drupal:10.2.0 and is removed from drupal:11.0.0. Use \Drupal\Core\StringTranslation\ByteSizeMarkup::create($size, $langcode) instead.

See also

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

File

core/modules/migrate/src/MigrateExecutable.php, line 638

Class

MigrateExecutable
Defines a migrate executable class.

Namespace

Drupal\migrate

Code

protected function formatSize($size) {
  @trigger_error(__METHOD__ . '() is deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Use \\Drupal\\Core\\StringTranslation\\ByteSizeMarkup::create($size, $langcode) instead. See https://www.drupal.org/node/2999981', E_USER_DEPRECATED);
  return format_size($size);
}