Added job artifacts, dealing with cancelled battle & fixed and improved notification
All checks were successful
Push image to registry / build-image (push) Successful in 4m29s
All checks were successful
Push image to registry / build-image (push) Successful in 4m29s
This commit is contained in:
@ -0,0 +1,43 @@
|
||||
<?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();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user