PluginProbe
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder / 1.2.4
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder v1.2.4
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 3.6.66 All 195 releases
fluentform / app / Modules / Form / Settings / ExtraSettings.php

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

96 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 * @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 Acl::verify('fluentform_settings_manager');
29
30 $this->request = $application->request;
31 $this->form_model = wpFluent()->table('fluentform_forms');
32 }
33
34 /**
35 * Get extra settig navigations
36 * @return void
37 */
38 public function getExtraSettingNavs()
39 {
40 $formId = $this->request->get('form_id');
41 $extraSettings = array(
42 array(
43 'name' => 'web_hooks',
44 'label' => __('Web Hooks', 'fluentform'),
45 'action' => 'fluentform_get_settings_page',
46 'addon' => 'Fluent Web Hooks'
47 ),
48 array(
49 'name' => 'trello',
50 'label' => __('Trello', 'fluentform'),
51 'action' => 'fluentform_get_settings_page',
52 'addon' => 'Trello'
53 )
54 );
55 wp_send_json_success(
56 array(
57 'setting_navs' => $extraSettings
58 ), 200);
59 exit();
60 }
61
62 /**
63 * Get extra settigs component
64 * @return void
65 */
66 public function getExtraSettingsComponent()
67 {
68 $formId = $this->request->get('form_id');
69 $module = $this->request->get('module');
70
71 $component = array(
72 'name' => 'fluentform_settings_'.$module,
73 'props' => ['form_id'],
74 'template' => "<p>Setting Not Found</p>"
75 );
76
77 $component = apply_filters('fluentform_settings_module_'.$module, $component, $formId);
78
79 wp_send_json_success(array(
80 'component' => $component,
81 'name' => 'fluentform_settings_'.$module,
82 'js_url' => site_url().'/test.js'
83 ));
84 exit();
85 }
86
87 /**
88 * Get trello settigs
89 * @return void
90 */
91 public function getTrelloSettingsComponent($component, $formId)
92 {
93 return $component;
94 }
95 }
96