*/ class ImageableUpdated extends PivotUpdatedEvent { use HasLabel { privateLabel as label; } public function __construct(Imageable $imageable) { parent::__construct($imageable->imageable, $imageable->image); $this->initializeEmbedFields($imageable); } /** * 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()}**' for {$this->label($related)} '**{$related->getName()}**' has been updated."; } }