PluginProbe
Fluent Support – Helpdesk & Customer Support Ticket System / 2.4.5
Fluent Support – Helpdesk & Customer Support Ticket System v2.4.5
2.4.5 2.4.0 2.3.2 2.3.1 2.3.0 2.2.1 2.2.0 trunk 1.10.0 1.10.1 1.10.2 1.10.3 1.10.4 1.10.5 1.4.0 1.4.1 1.4.2 1.4.5 1.4.6 1.4.7 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 All 69 releases
← All changes | app/Modules/IntegrationSettingsModule.php +16 -1 1.4.6 → 2.4.5 View file →
@@ -1,12 +1,20 @@
1 1 <?php
2 2
3 3 namespace FluentSupport\App\Modules;
4 4
5 +/**
6 + * Registry of notification integrations and their settings.
7 + */
5 8 class IntegrationSettingsModule
6 9 {
7 10 private static $integrations = [];
8 11
12 + /**
13 + * @param string $integrationKey
14 + * @param bool $withFields
15 + * @return mixed|false False when the integration isn't registered.
16 + */
9 17 public static function getSettings($integrationKey, $withFields = false)
10 18 {
11 19 $integrationClasses = self::$integrations;
12 20
@@ -15,12 +23,16 @@
15 23 if(!$class) {
16 24 return false;
17 25 }
18 26
19 -
20 27 return $class->getSettings($withFields);
21 28 }
22 29
30 + /**
31 + * @param string $integrationKey
32 + * @param array $settings
33 + * @return mixed|false False when the integration isn't registered.
34 + */
23 35 public static function saveSettings($integrationKey, $settings)
24 36 {
25 37 $integrationClasses = self::$integrations;
26 38
@@ -32,8 +44,11 @@
32 44
33 45 return $class->saveSettings($settings);
34 46 }
35 47
48 + /**
49 + * @param \FluentSupport\App\Services\Integrations\NotificationIntegrationBase $class
50 + */
36 51 public static function addIntegration($class)
37 52 {
38 53 self::$integrations[$class->getKey()] = $class;
39 54 }