function MigrateExecutable::formatSize

Same name in other branches
  1. 8.9.x core/modules/migrate/src/MigrateExecutable.php \Drupal\migrate\MigrateExecutable::formatSize()
  2. 10 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.

1 call to MigrateExecutable::formatSize()
MigrateExecutable::memoryExceeded in core/modules/migrate/src/MigrateExecutable.php
Tests whether we've exceeded the desired memory threshold.
1 method overrides MigrateExecutable::formatSize()
TestMigrateExecutable::formatSize in core/modules/migrate/tests/src/Unit/TestMigrateExecutable.php
Generates a string representation for the given byte count.

File

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

Class

MigrateExecutable
Defines a migrate executable class.

Namespace

Drupal\migrate

Code

protected function formatSize($size) {
    return format_size($size);
}

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