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 / TaskManagement / Tasks / FirstConnectionTask.php

FirstConnectionTask.php in Metricool – Social media and site statistics trunk, at app/Features/TaskManagement/Tasks/FirstConnectionTask.php

43 lines 942 B
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\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 }
43