You are here

protected function InputHelper::saveFileUpload in FillPDF 8.4

Same name and namespace in other branches
  1. 5.0.x src/InputHelper.php \Drupal\fillpdf\InputHelper::saveFileUpload()

Saves an uploaded file, marking it permanent.

Parameters

\Drupal\file\FileInterface $file: The file object to save.

Deprecated

in fillpdf:8.x-4.7 and is removed from fillpdf:8.x-5.0. Use FileInterface::setPermanent() and FileInterface::save() instead.

See also

https://www.drupal.org/project/fillpdf/issues/3055123

\Drupal\file\FileInterface

File

src/InputHelper.php, line 127

Class

InputHelper
Class InputHelper.

Namespace

Drupal\fillpdf

Code

protected function saveFileUpload(FileInterface $file) {
  @trigger_error('InputHelper::saveFileUpload() is deprecated in fillpdf:8.x-4.7 and is removed from fillpdf:8.x-5.0. Use \\Drupal\\file\\FileInterface::setPermanent() and \\Drupal\\file\\FileInterface::save() instead. See https://www.drupal.org/project/fillpdf/issues/3055123', E_USER_DEPRECATED);
  $file
    ->setPermanent();
  $file
    ->save();
}