Implements Drupal\file\FileUsage\FileUsageInterface::add().
Overrides FileUsageInterface::add
public function add(File $file, $module, $type, $id, $count = 1) {
// Make sure that a used file is permament.
if ($file->status != FILE_STATUS_PERMANENT) {
$file->status = FILE_STATUS_PERMANENT;
$file
->save();
}
}