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/TaskManagement/Tasks/FirstConnectionTask.php +42 -0 2.0.0 → 2.1.1 View file →
@@ -1,0 +1,42 @@
1 +<?php
2 +
3 +declare(strict_types=1);
4 +
5 +namespace Metricool\Features\TaskManagement\Tasks;
6 +
7 +use Metricool\Support\Helpers\MetricoolUrl;
8 +use Metricool\Support\Helpers\Storages\EnvironmentConfig;
9 +
10 +class FirstConnectionTask extends AbstractTask
11 +{
12 + public const IDENTIFIER = 'first_connection';
13 +
14 + protected bool $required = false;
15 +
16 + private EnvironmentConfig $env;
17 +
18 + public function __construct(EnvironmentConfig $env)
19 + {
20 + $this->env = $env;
21 + }
22 +
23 + /**
24 + * @inheritDoc
25 + */
26 + public function getText(): string
27 + {
28 + return __('Get the most out of Metricool by linking your Social accounts', 'metricool');
29 + }
30 +
31 + /**
32 + * @inheritDoc
33 + */
34 + public function getAction(): array
35 + {
36 + return [
37 + 'text' => __('Connect', 'metricool'),
38 + 'link' => MetricoolUrl::adminUrl($this->env->getUrl('metricool.connect_network_url')),
39 + 'target' => '_blank',
40 + ];
41 + }
42 +}