You are here

protected function BatchWatermarkForm::checkFiles in Media watermark 8

Helper to check file fids.

Parameters

array $fids: File ids array.

Return value

mixed File ids array.

2 calls to BatchWatermarkForm::checkFiles()
BatchWatermarkForm::addWatermarks in src/Form/BatchWatermarkForm.php
Batch helper function.
BatchWatermarkForm::validateForm in src/Form/BatchWatermarkForm.php
Form validation handler.

File

src/Form/BatchWatermarkForm.php, line 152

Class

BatchWatermarkForm
Class BatchWatermarkForm.

Namespace

Drupal\media_watermark\Form

Code

protected function checkFiles(array $fids) {
  $file_fids = [];
  foreach ($fids as $key => $fid) {
    if (!empty($fid)) {
      $file_fids[] = $fid;
    }
  }
  return $file_fids;
}