You are here

protected function MediaBulkUploadForm::isMaxFileSizeLarger in Media Bulk Upload 8

Validate if a max file size is bigger then the current max file size.

Parameters

string $MaxFileSize: File Size.

Return value

bool TRUE if the given size is larger than the one that is set.

1 call to MediaBulkUploadForm::isMaxFileSizeLarger()
MediaBulkUploadForm::buildForm in src/Form/MediaBulkUploadForm.php
Form constructor.

File

src/Form/MediaBulkUploadForm.php, line 271

Class

MediaBulkUploadForm
Class BulkMediaUploadForm.

Namespace

Drupal\media_bulk_upload\Form

Code

protected function isMaxFileSizeLarger($MaxFileSize) {
  $size = Bytes::toInt($MaxFileSize);
  $currentSize = Bytes::toInt($this->maxFileSizeForm);
  return $size > $currentSize;
}