-
-
Notifications
You must be signed in to change notification settings - Fork 108
Expand file tree
/
Copy pathPluginStatus.php
More file actions
31 lines (27 loc) · 678 Bytes
/
PluginStatus.php
File metadata and controls
31 lines (27 loc) · 678 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
namespace App\Enums;
enum PluginStatus: string
{
case Draft = 'draft';
case Pending = 'pending';
case Approved = 'approved';
case Rejected = 'rejected';
public function label(): string
{
return match ($this) {
self::Draft => 'Draft',
self::Pending => 'Pending Review',
self::Approved => 'Approved',
self::Rejected => 'Rejected',
};
}
public function color(): string
{
return match ($this) {
self::Draft => 'zinc',
self::Pending => 'yellow',
self::Approved => 'green',
self::Rejected => 'red',
};
}
}