← All changes
|
src/Integrations/Plugins/PluginIntegrationAbstract.php
+30
-0
7.1.4
→
8.0.2
View file →
| @@ -37,11 +37,41 @@ | ||
| 37 | 37 | 'type' => TPTIntegrationOption::FIELD_TYPE, |
| 38 | 38 | 'icon_url' => $this->getIconURL(), |
| 39 | 39 | 'author_url' => $this->getAuthorURL(), |
| 40 | 40 | 'integration_category' => $this->getIntegrationCategory(), |
| 41 | + 'official' => $this->isOfficial(), | |
| 42 | + 'action_links' => $this->getActionLinks(), | |
| 43 | + 'meta_pills' => $this->getMetaPills(), | |
| 41 | 44 | ); |
| 42 | 45 | |
| 43 | 46 | return $integrations; |
| 47 | + } | |
| 48 | + | |
| 49 | + /** | |
| 50 | + * Whether the integrated plugin is made by U2Code (the makers of this plugin). | |
| 51 | + * Official integrations get a badge on the integrations screen and are listed first in their category. | |
| 52 | + */ | |
| 53 | + public function isOfficial(): bool { | |
| 54 | + return false; | |
| 55 | + } | |
| 56 | + | |
| 57 | + /** | |
| 58 | + * Optional action links rendered under the integration description | |
| 59 | + * (e.g. install / activate the integrated plugin). | |
| 60 | + * | |
| 61 | + * @return array<int, array{url: string, label: string, target?: string}> | |
| 62 | + */ | |
| 63 | + public function getActionLinks(): array { | |
| 64 | + return array(); | |
| 65 | + } | |
| 66 | + | |
| 67 | + /** | |
| 68 | + * Optional short feature highlights rendered as pills under the integration title. | |
| 69 | + * | |
| 70 | + * @return array<int, string> | |
| 71 | + */ | |
| 72 | + public function getMetaPills(): array { | |
| 73 | + return array(); | |
| 44 | 74 | } |
| 45 | 75 | |
| 46 | 76 | public function getIconURL(): ?string { |
| 47 | 77 | return $this->getContainer()->getFileManager()->locateAsset( 'admin/integrations/placeholder.png' ); |