PluginProbe
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder / 4.3.21
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder v4.3.21
6.2.14 6.2.13 6.2.12 6.2.10 6.2.11 6.2.9 6.2.8 6.2.7 6.2.6 6.2.5 6.2.4 6.2.3 6.2.2 3.6.22 3.6.31 3.6.40 3.6.41 3.6.42 3.6.50 3.6.51 3.6.60 3.6.61 3.6.62 3.6.64 3.6.65 All 196 releases
fluentform / app / Modules / Form / Settings / ExtraSettings.php

ExtraSettings.php in Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder 4.3.21, at app/Modules/Form/Settings/ExtraSettings.php

92 lines 2.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace FluentForm\App\Modules\Form\Settings;
4
5 use FluentForm\App;
6 use FluentForm\App\Modules\Acl\Acl;
7 use FluentForm\Framework\Foundation\Application;
8
9 class ExtraSettings
10 {
11 /**
12 * Request Object
13 *
14 * @var \FluentForm\Framework\Request\Request $request
15 */
16 protected $request;
17
18 /**
19 * Query Builder Handler Object
20 *
21 * @var \WpFluent\QueryBuilder\QueryBuilderHandler
22 */
23 protected $form_model;
24
25 /**
26 * Construct the object
27 *
28 * @throws \Exception
29 */
30 public function __construct(Application $application)
31 {
32 $this->request = $application->request;
33 $this->form_model = wpFluent()->table('fluentform_forms');
34 }
35
36 /**
37 * Get extra settig navigations
38 */
39 public function getExtraSettingNavs()
40 {
41 $formId = $this->request->get('form_id');
42
43 $extraSettings = [
44 [
45 'name' => 'web_hooks',
46 'label' => __('Web Hooks', 'fluentform'),
47 'action' => 'fluentform_get_settings_page',
48 'addon' => 'Fluent Web Hooks',
49 ],
50 [
51 'name' => 'trello',
52 'label' => __('Trello', 'fluentform'),
53 'action' => 'fluentform_get_settings_page',
54 'addon' => 'Trello',
55 ],
56 ];
57
58 wp_send_json_success(['setting_navs' => $extraSettings], 200);
59 }
60
61 /**
62 * Get extra settigs component
63 */
64 public function getExtraSettingsComponent()
65 {
66 $formId = $this->request->get('form_id');
67 $module = $this->request->get('module');
68
69 $component = [
70 'name' => 'fluentform_settings_' . $module,
71 'props' => ['form_id'],
72 'template' => '<p>Setting Not Found</p>',
73 ];
74
75 $component = apply_filters('fluentform_settings_module_' . $module, $component, $formId);
76
77 wp_send_json_success([
78 'component' => $component,
79 'name' => 'fluentform_settings_' . $module,
80 'js_url' => site_url() . '/test.js',
81 ]);
82 }
83
84 /**
85 * Get trello settigs
86 */
87 public function getTrelloSettingsComponent($component, $formId)
88 {
89 return $component;
90 }
91 }
92