mirror of
https://github.com/AnimeThemes/animethemes-server.git
synced 2026-10-18 08:40:43 +02:00
* feat: add playlist resources * style: fix StyleCI findings * fix(admin): address nova exceptions
42 lines
965 B
PHP
42 lines
965 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Events\Pivot\Wiki\ArtistImage;
|
|
|
|
use App\Events\Base\Pivot\PivotCreatedEvent;
|
|
use App\Models\Wiki\Artist;
|
|
use App\Models\Wiki\Image;
|
|
use App\Pivots\Wiki\ArtistImage;
|
|
|
|
/**
|
|
* Class ArtistImageCreated.
|
|
*
|
|
* @extends PivotCreatedEvent<Artist, Image>
|
|
*/
|
|
class ArtistImageCreated extends PivotCreatedEvent
|
|
{
|
|
/**
|
|
* Create a new event instance.
|
|
*
|
|
* @param ArtistImage $artistImage
|
|
*/
|
|
public function __construct(ArtistImage $artistImage)
|
|
{
|
|
parent::__construct($artistImage->artist, $artistImage->image);
|
|
}
|
|
|
|
/**
|
|
* Get the description for the Discord message payload.
|
|
*
|
|
* @return string
|
|
*/
|
|
protected function getDiscordMessageDescription(): string
|
|
{
|
|
$foreign = $this->getForeign();
|
|
$related = $this->getRelated();
|
|
|
|
return "Image '**{$foreign->getName()}**' has been attached to Artist '**{$related->getName()}**'.";
|
|
}
|
|
}
|