You are here

private function ManageFilesForm::minifiedFilesize in Minify JS 8.2

Helper function to format the minified filesize.

Parameters

object $file: The file that has the filesize to format.

Return value

string|int The formatted filesize or 0.

1 call to ManageFilesForm::minifiedFilesize()
ManageFilesForm::buildForm in src/Form/ManageFilesForm.php
Form constructor.

File

src/Form/ManageFilesForm.php, line 329

Class

ManageFilesForm
Manage files form class.

Namespace

Drupal\minifyjs\Form

Code

private function minifiedFilesize($file) {
  if ($file->minified_uri) {
    if ($file->minified_size > 0) {
      return $this
        ->formatFilesize($file->minified_size);
    }
    return 0;
  }
  return '-';
}