All checks were successful
Push image to registry / build-image (push) Successful in 4m29s
44 lines
1.0 KiB
PHP
44 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace App\Browser\Jobs\HellcaseBattles;
|
|
|
|
use App\Models\HellcaseBattle;
|
|
use App\Notification\Notification;
|
|
use App\Notification\Stringifiable;
|
|
use App\Notification\Stringifiable\StringifiableSimpleText;
|
|
|
|
class HellcaseBattlesNofication extends Notification {
|
|
|
|
private HellcaseBattle $battle;
|
|
|
|
public function __construct(int $jobId, HellcaseBattle $battle) {
|
|
parent::__construct($jobId);
|
|
|
|
$this->battle = $battle;
|
|
|
|
$this->setBody($this->generateBody());
|
|
}
|
|
|
|
private function generateBody() {
|
|
return new HellcaseBattlesNotificationBody($this->battle);
|
|
}
|
|
|
|
public function getTitle(): Stringifiable {
|
|
return new StringifiableSimpleText("Nouvelle bataille de caisses Hellcase");
|
|
}
|
|
|
|
/**
|
|
* @inheritDoc
|
|
*/
|
|
public function getImageProjectPath(): string|null {
|
|
return HellcaseBattleScreenshot::getImgFileProjectPath();
|
|
}
|
|
|
|
/**
|
|
* @inheritDoc
|
|
*/
|
|
public function getLinkURL(): string|null {
|
|
return $this->battle->getUrl();
|
|
}
|
|
}
|