19 declare(strict_types=1);
27 private readonly
string $certificatePath,
34 if (is_file($this->fileService->getBackgroundImageThumbPath())) {
35 unlink($this->fileService->getBackgroundImageThumbPath());
39 if (is_int($version) && $version >= 0) {
40 $version_string = (string) $version;
43 $filename = $this->certificatePath .
'background_' . $version_string .
'.jpg';
48 foreach ($this->fileService->getValidBackgroundImageFileExtensions() as $extension) {
49 if (file_exists($this->fileService->getBackgroundImageTempfilePath($extension))) {
50 unlink($this->fileService->getBackgroundImageTempfilePath($extension));
deleteBackgroundImage(?int $version)
__construct(private readonly string $certificatePath, private readonly ilCertificateBackgroundImageFileService $fileService)