Skip to content

Commit

Permalink
Fixed running static getFullLogoUrl method dynamically
Browse files Browse the repository at this point in the history
  • Loading branch information
paaton committed Aug 21, 2024
1 parent 9a0ae4c commit f9ef933
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Event/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public function getAvailableRoles(): array

public function getLogoInBase64(): string
{
return ImageUtils::getLocalImageInBase64($this->getFullLogoUrl($this->logoUrl));
return ImageUtils::getLocalImageInBase64(self::getFullLogoUrl($this->logoUrl));
}

public static function getFullLogoUrl(string $logoUrl): string
Expand Down
3 changes: 2 additions & 1 deletion src/Mailer/Mailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace kissj\Mailer;

use kissj\Event\Event;
use kissj\Participant\Participant;
use kissj\Payment\Payment;
use kissj\Payment\QrCodeService;
Expand Down Expand Up @@ -224,7 +225,7 @@ private function sendMailFromTemplate(
$email->htmlTemplate('emails/' . $templateName . '.twig');
$email->context(array_merge($parameters, [
'fullRegistrationLink' => $this->settings->getFullUrlLink(),
'eventImageExists' => is_file(__DIR__ . '/../../public/' . $event->getFullLogoUrl($event->logoUrl)),
'eventImageExists' => is_file(__DIR__ . '/../../public/' . Event::getFullLogoUrl($event->logoUrl)),
]));
array_map(fn (string $attachment) => $email->attach($attachment), $attachments);
foreach ($embeds as $embed) {
Expand Down

0 comments on commit f9ef933

Please sign in to comment.