mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 20:40:49 +08:00
Announce Log
This commit is contained in:
26
app/Enums/AnnounceEventEnum.php
Normal file
26
app/Enums/AnnounceEventEnum.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
use function PHPUnit\Framework\matches;
|
||||
|
||||
enum AnnounceEventEnum: string
|
||||
{
|
||||
case STARTED = "started";
|
||||
case STOPPED = "stopped";
|
||||
case PAUSED = "paused";
|
||||
case COMPLETED = "completed";
|
||||
case NONE = "none";
|
||||
|
||||
public function label(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::STARTED => nexus_trans("announce_log.events.started"),
|
||||
self::STOPPED => nexus_trans("announce_log.events.stopped"),
|
||||
self::PAUSED => nexus_trans("announce_log.events.paused"),
|
||||
self::COMPLETED => nexus_trans("announce_log.events.completed"),
|
||||
self::NONE => nexus_trans("announce_log.events.none"),
|
||||
default => '',
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user