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 / TwitterTask.php

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

51 lines 1006 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 TwitterTask extends AbstractTask
11 {
12 public const IDENTIFIER = 'connect_twitter';
13
14 /**
15 * @inheritDoc
16 */
17 protected bool $required = true;
18
19 /**
20 * @inheritDoc
21 */
22 protected bool $premium = true;
23
24 private EnvironmentConfig $env;
25
26 public function __construct(EnvironmentConfig $env)
27 {
28 $this->env = $env;
29 }
30
31 /**
32 * @inheritDoc
33 */
34 public function getText(): string
35 {
36 return __('Connect your Twitter account', 'metricool');
37 }
38
39 /**
40 * @inheritDoc
41 */
42 public function getAction(): array
43 {
44 return [
45 'text' => __('Connect', 'metricool'),
46 'link' => MetricoolUrl::adminUrl($this->env->getUrl('metricool.connect_twitter_url')),
47 'target' => '_blank',
48 ];
49 }
50 }
51