instances added god may help

This commit is contained in:
2026-02-23 12:58:19 +01:00
parent 25370a1a55
commit 99db252f60
290 changed files with 9858 additions and 4914 deletions

View File

@@ -6,7 +6,7 @@ use Dompdf\Dompdf;
use Dompdf\Options;
use Endroid\QrCode\QrCode;
use Endroid\QrCode\Writer\PngWriter;
use MintyPHP\Service\Branding\BrandingLogoService;
use MintyPHP\Service\Branding\BrandingServicesFactory;
use Throwable;
use ZipArchive;
@@ -168,12 +168,13 @@ class UserAccessPdfService
$path = '';
$mime = '';
$logoService = (new BrandingServicesFactory())->createBrandingLogoService();
// Prefer tenant/app branding logo first.
if (class_exists(BrandingLogoService::class) && BrandingLogoService::hasLogo()) {
$logoPath = BrandingLogoService::findLogoPath(128);
if ($logoService->hasLogo()) {
$logoPath = $logoService->findLogoPath(128);
if ($logoPath && is_file($logoPath)) {
$path = $logoPath;
$mime = BrandingLogoService::detectMime($logoPath);
$mime = $logoService->detectMime($logoPath);
}
}