PluginProbe
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder / 4.3.6
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder v4.3.6
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.6, at app/Modules/Form/Settings/ExtraSettings.php

91 lines 2.1 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 * @var \FluentForm\Framework\Request\Request $request
13 */
14 protected $request;
15
16 /**
17 * @var \WpFluent\QueryBuilder\QueryBuilderHandler
18 */
19 protected $form_model;
20
21 /**
22 * Construct the object
23 * @throws \Exception
24 * @return void
25 */
26 public function __construct(Application $application)
27 {
28 $this->request = $application->request;
29 $this->form_model = wpFluent()->table('fluentform_forms');
30 }
31
32 /**
33 * Get extra settig navigations
34 * @return void
35 */
36 public function getExtraSettingNavs()
37 {
38 $formId = $this->request->get('form_id');
39
40 $extraSettings = array(
41 array(
42 'name' => 'web_hooks',
43 'label' => __('Web Hooks', 'fluentform'),
44 'action' => 'fluentform_get_settings_page',
45 'addon' => 'Fluent Web Hooks'
46 ),
47 array(
48 'name' => 'trello',
49 'label' => __('Trello', 'fluentform'),
50 'action' => 'fluentform_get_settings_page',
51 'addon' => 'Trello'
52 )
53 );
54
55 wp_send_json_success(['setting_navs' => $extraSettings], 200);
56 }
57
58 /**
59 * Get extra settigs component
60 * @return void
61 */
62 public function getExtraSettingsComponent()
63 {
64 $formId = $this->request->get('form_id');
65 $module = $this->request->get('module');
66
67 $component = array(
68 'name' => 'fluentform_settings_'.$module,
69 'props' => ['form_id'],
70 'template' => "<p>Setting Not Found</p>"
71 );
72
73 $component = apply_filters('fluentform_settings_module_'.$module, $component, $formId);
74
75 wp_send_json_success(array(
76 'component' => $component,
77 'name' => 'fluentform_settings_'.$module,
78 'js_url' => site_url().'/test.js'
79 ));
80 }
81
82 /**
83 * Get trello settigs
84 * @return void
85 */
86 public function getTrelloSettingsComponent($component, $formId)
87 {
88 return $component;
89 }
90 }
91