PluginProbe
Fluent Booking – The Ultimate Appointments Scheduling, Events Booking, Events Calendar Solution / trunk
Fluent Booking – The Ultimate Appointments Scheduling, Events Booking, Events Calendar Solution vtrunk
2.4.0 2.3.0 2.2.5 2.2.0 2.1.2 2.1.1 trunk 1.10.0 1.10.01 1.10.02 1.5.0 1.5.01 1.5.02 1.5.1 1.5.10 1.5.20 1.5.21 1.5.22 1.5.23 1.5.24 1.5.25 1.6.0 1.7.0 1.7.1 1.7.2 All 33 releases
fluent-booking / app / Services / Integrations / IntegrationManagerHelper.php

IntegrationManagerHelper.php in Fluent Booking – The Ultimate Appointments Scheduling, Events Booking, Events Calendar Solution trunk, at app/Services/Integrations/IntegrationManagerHelper.php

67 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace FluentBooking\App\Services\Integrations;
4
5 use FluentBooking\App\Models\Meta;
6
7 class IntegrationManagerHelper
8 {
9 protected $settingsKey;
10 protected $formId;
11 protected $isMultiple;
12
13 protected $integrationService;
14
15 public function __construct($settingsKey = '', $form_id = false, $isMultiple = false)
16 {
17 $this->settingsKey = $settingsKey;
18 $this->isMultiple = $isMultiple;
19 $this->integrationService = new CalendarIntegrationService();
20 }
21
22 public function get($settingsId)
23 {
24 $settings = Meta::where('form_id', $this->formId)
25 ->where('meta_key', $this->settingsKey)
26 ->find($settingsId);
27 $settings->formattedValue = $this->getFormattedValue($settings);
28 return $settings;
29 }
30
31 public function save($settings)
32 {
33 //
34 }
35
36 public function update($settingsId, $settings)
37 {
38 //
39 }
40
41 public function delete($settingsId)
42 {
43 Meta::where('id', $settingsId)
44 ->delete();
45 }
46
47 public function getAll()
48 {
49 return [];
50 }
51
52
53 protected function getApiResponseMessage($response, $status)
54 {
55 if (is_array($response) && isset($response['message'])) {
56 return $response['message'];
57 }
58
59 return $status;
60 }
61
62 public function getFormattedValue($setting)
63 {
64 return $setting->value;
65 }
66 }
67