mirror of
https://github.com/AnimeThemes/animethemes-server.git
synced 2026-09-30 16:16:59 +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\StudioImage;
|
|
|
|
use App\Events\Base\Pivot\PivotCreatedEvent;
|
|
use App\Models\Wiki\Image;
|
|
use App\Models\Wiki\Studio;
|
|
use App\Pivots\Wiki\StudioImage;
|
|
|
|
/**
|
|
* Class StudioImageCreated.
|
|
*
|
|
* @extends PivotCreatedEvent<Studio, Image>
|
|
*/
|
|
class StudioImageCreated extends PivotCreatedEvent
|
|
{
|
|
/**
|
|
* Create a new event instance.
|
|
*
|
|
* @param StudioImage $studioImage
|
|
*/
|
|
public function __construct(StudioImage $studioImage)
|
|
{
|
|
parent::__construct($studioImage->studio, $studioImage->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 Studio '**{$related->getName()}**'.";
|
|
}
|
|
}
|