PluginProbe
Metricool – Social media and site statistics / trunk
Metricool – Social media and site statistics vtrunk
2.1.0 2.0.2 2.0.1 2.0.0 1.27 trunk
metricool / app / Features / Notifications / Notices / ExampleConnectionsWarning.php

ExampleConnectionsWarning.php in Metricool – Social media and site statistics trunk, at app/Features/Notifications/Notices/ExampleConnectionsWarning.php

66 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 declare(strict_types=1);
4
5 namespace Metricool\Features\Notifications\Notices;
6
7 use Metricool\Support\Helpers\MetricoolUrl;
8 use Metricool\Support\Helpers\Storages\EnvironmentConfig;
9
10 class ExampleConnectionsWarning extends AbstractNotice
11 {
12 public const IDENTIFIER = 'example_connections_warning';
13 protected bool $active = true;
14
15 private EnvironmentConfig $env;
16
17 public function __construct(EnvironmentConfig $env)
18 {
19 $this->env = $env;
20 }
21
22 /**
23 * @inheritDoc
24 */
25 public function getTitle(): string
26 {
27 return __('This notice is a warning.', 'metricool');
28 }
29
30 /**
31 * @inheritDoc
32 */
33 public function getText(): string
34 {
35 return __('This notice is a warning.', 'metricool');
36 }
37
38 /**
39 * @inheritDoc
40 */
41 public function getType(): string
42 {
43 return self::TYPE_WARNING;
44 }
45
46 /**
47 * @inheritDoc
48 */
49 public function getRoute(): string
50 {
51 return 'general';
52 }
53
54 /**
55 * @inheritDoc
56 */
57 public function getAction(): array
58 {
59 return [
60 'text' => __('Connect', 'metricool'),
61 'link' => MetricoolUrl::adminUrl($this->env->getUrl('metricool.connect_network_url')),
62 'target' => '_blank',
63 ];
64 }
65 }
66