ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
classs.ilCertificateBackgroundImageDelete.php
Go to the documentation of this file.
1 <?php declare(strict_types=1);
2 /* Copyright (c) 1998-2019 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
8 {
9 
14 
18  private $fileService;
19 
25  {
26  $this->certificatePath = $certificatePath;
27  $this->fileService = $fileService;
28  }
29 
30  public function deleteBackgroundImage(string $version)
31  {
32  if (file_exists($this->fileService->getBackgroundImageThumbPath())) {
33  unlink($this->fileService->getBackgroundImageThumbPath());
34  }
35 
36  $filename = $this->certificatePath . 'background_' . $version . '.jpg';
37  if (file_exists($filename)) {
38  unlink($filename);
39  }
40 
41  if (file_exists($this->fileService->getBackgroundImageTempfilePath())) {
42  unlink($this->fileService->getBackgroundImageTempfilePath());
43  }
44  }
45 }
__construct(string $certificatePath, ilCertificateBackgroundImageFileService $fileService)
$filename
Definition: buildRTE.php:89