You are here

public static function MarkerIconService::fileSave in Geofield Map 8.2

Save a file, handling exception.

Parameters

\Drupal\file\Entity\File $file: The file to save.

1 call to MarkerIconService::fileSave()
MarkerIconService::validateIconImageStatus in src/Services/MarkerIconService.php
Validates the Icon Image statuses.

File

src/Services/MarkerIconService.php, line 272

Class

MarkerIconService
Provides an Icon Managed File Service.

Namespace

Drupal\geofield_map\Services

Code

public static function fileSave(File $file) {
  try {
    $file
      ->save();
  } catch (EntityStorageException $e) {
    Drupal::logger('Geofield Map Themer')
      ->log('warning', t("The file couldn't be saved: @message", [
      '@message' => $e
        ->getMessage(),
    ]));
  }
}