← All changes
|
app/Features/Notifications/Notices/ExampleWarning.php
+54
-0
2.0.0
→
2.1.1
View file →
| @@ -1,0 +1,54 @@ | ||
| 1 | +<?php | |
| 2 | + | |
| 3 | +declare(strict_types=1); | |
| 4 | + | |
| 5 | +namespace Metricool\Features\Notifications\Notices; | |
| 6 | + | |
| 7 | +class ExampleWarning extends AbstractNotice | |
| 8 | +{ | |
| 9 | + public const IDENTIFIER = 'example_warning'; | |
| 10 | + protected bool $active = true; | |
| 11 | + | |
| 12 | + /** | |
| 13 | + * @inheritDoc | |
| 14 | + */ | |
| 15 | + public function getTitle(): string | |
| 16 | + { | |
| 17 | + return __('This is a warning without a route.', 'metricool'); | |
| 18 | + } | |
| 19 | + | |
| 20 | + /** | |
| 21 | + * @inheritDoc | |
| 22 | + */ | |
| 23 | + public function getText(): string | |
| 24 | + { | |
| 25 | + return __('This is a warning without a route.', 'metricool'); | |
| 26 | + } | |
| 27 | + | |
| 28 | + /** | |
| 29 | + * @inheritDoc | |
| 30 | + */ | |
| 31 | + public function getType(): string | |
| 32 | + { | |
| 33 | + return self::TYPE_WARNING; | |
| 34 | + } | |
| 35 | + | |
| 36 | + /** | |
| 37 | + * @inheritDoc | |
| 38 | + */ | |
| 39 | + public function getRoute(): string | |
| 40 | + { | |
| 41 | + return ''; | |
| 42 | + } | |
| 43 | + | |
| 44 | + | |
| 45 | + /** | |
| 46 | + * @inheritDoc | |
| 47 | + */ | |
| 48 | + public function getAction(): array | |
| 49 | + { | |
| 50 | + return [ | |
| 51 | + | |
| 52 | + ]; | |
| 53 | + } | |
| 54 | +} | |