| 1 |
<?php |
| 2 |
|
| 3 |
namespace FluentSupport\App\Services\Notifications; |
| 4 |
|
| 5 |
class NotificationCategory |
| 6 |
{ |
| 7 |
const MENTIONS = 'mentions'; |
| 8 |
const TICKET_ACTIVITY = 'ticket_activity'; |
| 9 |
const AUTOMATION_TRIGGERS = 'automation_triggers'; |
| 10 |
|
| 11 |
public static function all() |
| 12 |
{ |
| 13 |
return [ |
| 14 |
static::MENTIONS, |
| 15 |
static::TICKET_ACTIVITY, |
| 16 |
static::AUTOMATION_TRIGGERS, |
| 17 |
]; |
| 18 |
} |
| 19 |
|
| 20 |
public static function options() |
| 21 |
{ |
| 22 |
return [ |
| 23 |
[ |
| 24 |
'key' => 'all', |
| 25 |
'label' => __('All', 'fluent-support') |
| 26 |
], |
| 27 |
[ |
| 28 |
'key' => static::MENTIONS, |
| 29 |
'label' => __('Mentions', 'fluent-support') |
| 30 |
], |
| 31 |
[ |
| 32 |
'key' => static::TICKET_ACTIVITY, |
| 33 |
'label' => __('Ticket Activity', 'fluent-support') |
| 34 |
], |
| 35 |
[ |
| 36 |
'key' => static::AUTOMATION_TRIGGERS, |
| 37 |
'label' => __('Automation Triggers', 'fluent-support') |
| 38 |
] |
| 39 |
]; |
| 40 |
} |
| 41 |
|
| 42 |
public static function isValid($category) |
| 43 |
{ |
| 44 |
return in_array($category, static::all(), true); |
| 45 |
} |
| 46 |
} |
| 47 |
|