Files
animethemes-server/app/Events/Admin/FeaturedTheme/FeaturedThemeUpdated.php
T
paranarimasu d168afd4e7 #470 feat: add featured theme model (#574)
* feat: add featured theme model

* style: fix StyleCI findings
2023-05-14 02:04:21 -05:00

48 lines
1.0 KiB
PHP

<?php
declare(strict_types=1);
namespace App\Events\Admin\FeaturedTheme;
use App\Events\Base\Admin\AdminUpdatedEvent;
use App\Models\Admin\FeaturedTheme;
/**
* Class FeaturedThemeUpdated.
*
* @extends AdminUpdatedEvent<FeaturedTheme>
*/
class FeaturedThemeUpdated extends AdminUpdatedEvent
{
/**
* Create a new event instance.
*
* @param FeaturedTheme $featuredTheme
*/
public function __construct(FeaturedTheme $featuredTheme)
{
parent::__construct($featuredTheme);
$this->initializeEmbedFields($featuredTheme);
}
/**
* Get the model that has fired this event.
*
* @return FeaturedTheme
*/
public function getModel(): FeaturedTheme
{
return $this->model;
}
/**
* Get the description for the Discord message payload.
*
* @return string
*/
protected function getDiscordMessageDescription(): string
{
return "Featured Theme '**{$this->getModel()->getName()}**' has been updated.";
}
}