PluginProbe
Metricool – Social media and site statistics / 2.0.2
Metricool – Social media and site statistics v2.0.2
2.1.0 2.0.2 2.0.1 2.0.0 1.27 trunk
metricool / app / Interfaces / NoticeInterface.php

NoticeInterface.php in Metricool – Social media and site statistics 2.0.2, at app/Interfaces/NoticeInterface.php

47 lines 1.1 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\Interfaces;
6
7 interface NoticeInterface
8 {
9 /**
10 * Returns the unique identifier of the notice
11 */
12 public function getId(): string;
13
14 /**
15 * Returns the version of the notice
16 */
17 public function getVersion(): string;
18
19 /**
20 * Method is used to add a link to the UI of the notice item.
21 * Example (normal link):
22 * [
23 * 'text' => 'Link text',
24 * 'link' => 'https://example.com' | '/services/new,
25 * ]
26 * Example (login link):
27 * [
28 * 'text' => 'Link text',
29 * 'login_link' => '/v2/management/',
30 * ]
31 */
32 public function getAction(): array;
33
34 /**
35 * Returns all data needed to show the notice in the UI. Keys that are
36 * required are 'id', 'text', 'status', 'type' and 'action'.
37 */
38 public function toArray(): array;
39
40 /**
41 * Use this method to set the notice as active based on a server-side
42 * condition. By default, a notice can activate based on a client-side
43 * condition.
44 */
45 public function setActive(bool $state = false): void;
46 }
47