*/ class ImageableDeleted extends PivotDeletedEvent { use HasLabel { privateLabel as label; } public function __construct(Imageable $imageable) { parent::__construct($imageable->imageable, $imageable->image); } /** * Get Discord channel the message will be sent to. * * @noinspection PhpMissingParentCallCommonInspection */ public function getDiscordChannel(): string { return $this->getRelated() instanceof Playlist ? Config::get(ServiceConstants::ADMIN_DISCORD_CHANNEL_QUALIFIED) : parent::getDiscordChannel(); } protected function getDiscordMessageDescription(): string { $foreign = $this->getForeign(); $related = $this->getRelated(); return "Image '**{$foreign->getName()}**' has been detached from {$this->label($related)} '**{$related->getName()}**'."; } }