PluginProbe
Metricool – Social media and site statistics / 2.1.1
Metricool – Social media and site statistics v2.1.1
2.1.1 2.1.0 2.0.2 2.0.1 2.0.0 1.27 trunk
← All changes | app/Features/Notifications/Notices/FirstConnectionNotice.php +65 -0 2.0.1 → 2.1.1 View file →
@@ -1,0 +1,65 @@
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 FirstConnectionNotice extends AbstractNotice
11 +{
12 + public const IDENTIFIER = 'first_connection';
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 __('Get the most out of Metricool', 'metricool');
28 + }
29 +
30 + /**
31 + * @inheritDoc
32 + */
33 + public function getText(): string
34 + {
35 + return __('Connect your first social account to Metricool to start scheduling and tracking your content.', 'metricool');
36 + }
37 +
38 + /**
39 + * @inheritDoc
40 + */
41 + public function getType(): string
42 + {
43 + return self::TYPE_INFO;
44 + }
45 +
46 + /**
47 + * @inheritDoc
48 + */
49 + public function getRoute(): string
50 + {
51 + return 'connections';
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 +}