| 1 |
<?php |
| 2 |
|
| 3 |
declare(strict_types=1); |
| 4 |
|
| 5 |
namespace Metricool\Features\Notifications\Notices; |
| 6 |
|
| 7 |
class ExamplePremiumWarning extends AbstractNotice |
| 8 |
{ |
| 9 |
public const IDENTIFIER = 'example_premium_warning'; |
| 10 |
protected bool $active = true; |
| 11 |
protected bool $premium = true; |
| 12 |
|
| 13 |
/** |
| 14 |
* @inheritDoc |
| 15 |
*/ |
| 16 |
public function getTitle(): string |
| 17 |
{ |
| 18 |
return __('This is an premium warning.', 'metricool'); |
| 19 |
} |
| 20 |
|
| 21 |
/** |
| 22 |
* @inheritDoc |
| 23 |
*/ |
| 24 |
public function getText(): string |
| 25 |
{ |
| 26 |
return __('This is an premium warning.', 'metricool'); |
| 27 |
} |
| 28 |
|
| 29 |
/** |
| 30 |
* @inheritDoc |
| 31 |
*/ |
| 32 |
public function getType(): string |
| 33 |
{ |
| 34 |
return self::TYPE_WARNING; |
| 35 |
} |
| 36 |
|
| 37 |
/** |
| 38 |
* @inheritDoc |
| 39 |
*/ |
| 40 |
public function getRoute(): string |
| 41 |
{ |
| 42 |
return 'general'; |
| 43 |
} |
| 44 |
|
| 45 |
|
| 46 |
/** |
| 47 |
* @inheritDoc |
| 48 |
*/ |
| 49 |
public function getAction(): array |
| 50 |
{ |
| 51 |
return [ |
| 52 |
'text' => __('Example text', 'metricool'), |
| 53 |
'link' => 'https://example.test', |
| 54 |
'target' => '_blank', |
| 55 |
]; |
| 56 |
} |
| 57 |
} |
| 58 |
|