PluginProbe
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder / 6.2.14
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder v6.2.14
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 / Services / GlobalSearchService.php

GlobalSearchService.php in Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder 6.2.14, at app/Services/GlobalSearchService.php

531 lines 26.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\Services;
4
5 use FluentForm\App\Helpers\Helper;
6 use FluentForm\App\Models\Form;
7 use FluentForm\App\Services\Manager\FormManagerService;
8
9 class GlobalSearchService
10 {
11
12 public function get()
13 {
14 $links = [
15 [
16 'title' => 'Forms',
17 'icon' => '',
18 'path' => '?page=fluent_forms',
19 'tags' => ['all', 'forms', 'dashboard'],
20 ],
21 [
22 'title' => 'Forms -> New Form',
23 'icon' => '',
24 'path' => '?page=fluent_forms#add=1',
25 'tags' => ['new forms', 'add forms', 'create'],
26 ],
27 [
28 'title' => 'Entries',
29 'icon' => '',
30 'path' => '?page=fluent_forms_all_entries',
31 'tags' => ['all', 'entries'],
32 ],
33 [
34 'title' => 'Support',
35 'icon' => '',
36 'path' => '?page=fluent_forms_docs',
37 'tags' => ['support', 'modules', 'docs'],
38 ],
39 [
40 'title' => 'Integrations -> Modules',
41 'icon' => '',
42 'path' => '?page=fluent_forms_add_ons',
43 'tags' => ['all', 'integrations', 'modules'],
44 ],
45 [
46 'title' => 'Global Settings > General',
47 'icon' => '',
48 'path' => '?page=fluent_forms_settings#payments/general_settings',
49 'tags' => [
50 'global',
51 'settings',
52 'general',
53 'layout',
54 'email summaries',
55 'failure',
56 'email notification',
57 'miscellaneous',
58 ],
59 ],
60 [
61 'title' => 'Global Settings > Security > reCaptcha',
62 'icon' => '',
63 'path' => '?page=fluent_forms_settings#re_captcha',
64 'tags' => ['global', 'security', 'recaptcha'],
65 ],
66 [
67 'title' => 'Global Settings > Security > hCaptcha',
68 'icon' => '',
69 'path' => '?page=fluent_forms_settings#h_captcha',
70 'tags' => ['global', 'security', 'hcaptcha'],
71 ],
72 [
73 'title' => 'Global Settings > Security > Turnstile',
74 'icon' => '',
75 'path' => '?page=fluent_forms_settings#turnstile',
76 'tags' => ['global', 'security', 'turnstile'],
77 ],
78 [
79 'title' => 'Global Settings > Managers',
80 'icon' => '',
81 'path' => '?page=fluent_forms_settings#managers',
82 'tags' => ['global', 'permissions', 'managers'],
83 ],
84 [
85 'title' => 'Global Settings > Configure Integration -> Mailchimp',
86 'icon' => '',
87 'path' => '?page=fluent_forms_settings#general-mailchimp-settings',
88 'tags' => ['global integrations', 'mailchimp'],
89 ],
90 [
91 'title' => 'Tools > Import forms',
92 'icon' => '',
93 'path' => '?page=fluent_forms_transfer#importforms',
94 'tags' => ['tools', 'migration', 'transfer', 'import'],
95 ],
96 [
97 'title' => 'Tools > Export Forms',
98 'icon' => '',
99 'path' => '?page=fluent_forms_transfer#exportsforms',
100 'tags' => ['tools', 'migration', 'transfer', 'export'],
101 ],
102 [
103 'title' => 'Tools > Migrator',
104 'icon' => '',
105 'path' => '?page=fluent_forms_transfer#migrator',
106 'tags' => ['tools', 'migration', 'transfer', 'migrator'],
107 ],
108 [
109 'title' => 'Tools > Activity Logs',
110 'icon' => '',
111 'path' => '?page=fluent_forms_transfer#activitylogs',
112 'tags' => ['tools', 'activity logs'],
113 ],
114 [
115 'title' => 'Tools > API Logs',
116 'icon' => '',
117 'path' => '?page=fluent_forms_transfer#apilogs',
118 'tags' => ['tools', 'api logs'],
119 ],
120 [
121 'title' => 'Payments',
122 'icon' => '',
123 'path' => '?page=fluent_forms_payment_entries',
124 'tags' => ['all', 'payments', 'entries'],
125 ],
126 [
127 'title' => 'Global Settings > Payment > Settings',
128 'icon' => '',
129 'path' => '?page=fluent_forms_settings' . (Helper::isPaymentCompatible() ? '#payments/general_settings' : '&component=payment_settings%2F#/'),
130 'tags' => ['global', 'settings', 'payment'],
131 ],
132 [
133 'title' => 'Global Settings > Payment > Payment Methods',
134 'icon' => '',
135 'path' => '?page=fluent_forms_settings' . (Helper::isPaymentCompatible() ? '#payments/payment_methods' : '&component=payment_settings%2F#/payment_methods'),
136 'tags' => ['global', 'settings', 'payment', 'method', 'stripe'],
137 ],
138 ];
139
140 if (Helper::hasPro()) {
141 $links = array_merge($links, [
142 [
143 'title' => 'Global Settings > Double Opt-in',
144 'icon' => '',
145 'path' => '?page=fluent_forms_settings#double_optin_settings',
146 'tags' => ['global', 'security', 'double opt-in', 'optin'],
147 ],
148 [
149 'title' => 'Global Settings > Payment > Coupons',
150 'icon' => '',
151 'path' => '?page=fluent_forms_settings' . (Helper::isPaymentCompatible() ? '#payments/coupons' : '&component=payment_settings%2F#/coupons'),
152 'tags' => ['global', 'settings', 'payment', 'coupons'],
153 ],
154 [
155 'title' => 'Global Settings > License',
156 'icon' => '',
157 'path' => '?page=fluent_forms_settings&component=license_page',
158 'tags' => ['global', 'license'],
159 ],
160 [
161 'title' => 'Global Settings > Configure Integration -> Google Map Integration',
162 'icon' => '',
163 'path' => '?page=fluent_forms_settings#google_maps_autocomplete',
164 'tags' => ['global', 'integrations', 'google map integration'],
165 ],
166 [
167 'title' => 'Global Settings > Configure Integration -> Activecampaign',
168 'icon' => '',
169 'path' => '?page=fluent_forms_settings#general-activecampaign-settings',
170 'tags' => ['global integrations', 'activecampaign'],
171 ],
172 [
173 'title' => 'Global Settings > Configure Integration -> Campaign Monitor',
174 'icon' => '',
175 'path' => '?page=fluent_forms_settings#general-campaign_monitor-settings',
176 'tags' => ['global integrations', 'campaign monitor'],
177 ],
178 [
179 'title' => 'Global Settings > Configure Integration -> Constant Contact',
180 'icon' => '',
181 'path' => '?page=fluent_forms_settings#general-constatantcontact-settings',
182 'tags' => ['global integrations', 'constatantcontact', 'constant contact'],
183 ],
184 [
185 'title' => 'Global Settings > Configure Integration -> ConvertKit',
186 'icon' => '',
187 'path' => '?page=fluent_forms_settings#general-convertkit-settings',
188 'tags' => ['global integrations', 'convertkit'],
189 ],
190 [
191 'title' => 'Global Settings > Configure Integration -> GetResponse',
192 'icon' => '',
193 'path' => '?page=fluent_forms_settings#general-getresponse-settings',
194 'tags' => ['global integrations', 'getresponse'],
195 ],
196 [
197 'title' => 'Global Settings > Configure Integration -> Hubspot',
198 'icon' => '',
199 'path' => '?page=fluent_forms_settings#general-hubspot-settings',
200 'tags' => ['global integrations', 'hubspot'],
201 ],
202 [
203 'title' => 'Global Settings > Configure Integration -> iContact',
204 'icon' => '',
205 'path' => '?page=fluent_forms_settings#general-icontact-settings',
206 'tags' => ['global integrations', 'icontact'],
207 ],
208 [
209 'title' => 'Global Settings > Configure Integration -> MooSend',
210 'icon' => '',
211 'path' => '?page=fluent_forms_settings#general-moosend-settings',
212 'tags' => ['global integrations', 'moosend'],
213 ],
214 [
215 'title' => 'Global Settings > Configure Integration -> Platformly',
216 'icon' => '',
217 'path' => '?page=fluent_forms_settings#general-platformly-settings',
218 'tags' => ['global integrations', 'platformly'],
219 ],
220 [
221 'title' => 'Global Settings > Configure Integration -> SendFox',
222 'icon' => '',
223 'path' => '?page=fluent_forms_settings#general-sendfox-settings',
224 'tags' => ['global integrations', 'sendfox'],
225 ],
226 [
227 'title' => 'Global Settings > Configure Integration -> MailerLite',
228 'icon' => '',
229 'path' => '?page=fluent_forms_settings#general-mailerlite-settings',
230 'tags' => ['global integrations', 'mailerlite'],
231 ],
232 [
233 'title' => 'Global Settings > Configure Integration -> Twilio',
234 'icon' => '',
235 'path' => '?page=fluent_forms_settings#general-sms_notification-settings',
236 'tags' => ['global integrations', 'sms notification', 'twilio'],
237 ],
238 [
239 'title' => 'Global Settings > Configure Integration -> GetGist',
240 'icon' => '',
241 'path' => '?page=fluent_forms_settings#general-getgist-settings',
242 'tags' => ['global integrations', 'getgist'],
243 ],
244 [
245 'title' => 'Global Settings > Configure Integration -> Google Sheet',
246 'icon' => '',
247 'path' => '?page=fluent_forms_settings#general-google_sheet-settings',
248 'tags' => ['global integrations', 'google sheet'],
249 ],
250 [
251 'title' => 'Global Settings > Configure Integration -> Trello',
252 'icon' => '',
253 'path' => '?page=fluent_forms_settings#general-trello-settings',
254 'tags' => ['global integrations', 'trello'],
255 ],
256 [
257 'title' => 'Global Settings > Configure Integration -> Drip',
258 'icon' => '',
259 'path' => '?page=fluent_forms_settings#general-drip-settings',
260 'tags' => ['global integrations', 'drip'],
261 ],
262 [
263 'title' => 'Global Settings > Configure Integration -> Brevo (formerly SendInBlue)',
264 'icon' => '',
265 'path' => '?page=fluent_forms_settings#general-sendinblue-settings',
266 'tags' => ['global integrations', 'sendinblue', 'brevo'],
267 ],
268 [
269 'title' => 'Global Settings > Configure Integration -> Automizy',
270 'icon' => '',
271 'path' => '?page=fluent_forms_settings#general-automizy-settings',
272 'tags' => ['global integrations', 'automizy'],
273 ],
274 [
275 'title' => 'Global Settings > Configure Integration -> Telegram Messenger',
276 'icon' => '',
277 'path' => '?page=fluent_forms_settings#general-telegram-settings',
278 'tags' => ['global integrations', 'telegram messenger'],
279 ],
280 [
281 'title' => 'Global Settings > Configure Integration -> Salesflare',
282 'icon' => '',
283 'path' => '?page=fluent_forms_settings#general-salesflare-settings',
284 'tags' => ['global integrations', 'salesflare'],
285 ],
286 [
287 'title' => 'Global Settings > Configure Integration -> CleverReach',
288 'icon' => '',
289 'path' => '?page=fluent_forms_settings#general-cleverreach-settings',
290 'tags' => ['global integrations', 'cleverreach'],
291 ],
292 [
293 'title' => 'Global Settings > Configure Integration -> ClickSend',
294 'icon' => '',
295 'path' => '?page=fluent_forms_settings#general-clicksend_sms_notification-settings',
296 'tags' => ['global integrations', 'clicksend', 'sms_notification'],
297 ],
298 [
299 'title' => 'Global Settings > Configure Integration -> Zoho CRM',
300 'icon' => '',
301 'path' => '?page=fluent_forms_settings#general-zohocrm-settings',
302 'tags' => ['global integrations', 'zoho crm'],
303 ],
304 [
305 'title' => 'Global Settings > Configure Integration -> Pipedrive',
306 'icon' => '',
307 'path' => '?page=fluent_forms_settings#general-pipedrive-settings',
308 'tags' => ['global integrations', 'pipedrive'],
309 ],
310 [
311 'title' => 'Global Settings > Configure Integration -> Salesforce',
312 'icon' => '',
313 'path' => '?page=fluent_forms_settings#general-salesforce-settings',
314 'tags' => ['global integrations', 'salesforce'],
315 ],
316 [
317 'title' => 'Global Settings > Configure Integration -> Amocrm',
318 'icon' => '',
319 'path' => '?page=fluent_forms_settings#general-amocrm-settings',
320 'tags' => ['global integrations', 'amocrm'],
321 ],
322 [
323 'title' => 'Global Settings > Configure Integration -> OnePageCrm',
324 'icon' => '',
325 'path' => '?page=fluent_forms_settings#general-onepagecrm-settings',
326 'tags' => ['global integrations', 'onepagecrm'],
327 ],
328 [
329 'title' => 'Global Settings > Configure Integration -> Airtable',
330 'icon' => '',
331 'path' => '?page=fluent_forms_settings#general-airtable-settings',
332 'tags' => ['global integrations', 'airtable'],
333 ],
334 [
335 'title' => 'Global Settings > Configure Integration -> Mailjet',
336 'icon' => '',
337 'path' => '?page=fluent_forms_settings#general-mailjet-settings',
338 'tags' => ['global integrations', 'mailjet'],
339 ],
340 [
341 'title' => 'Global Settings > Configure Integration -> Insightly',
342 'icon' => '',
343 'path' => '?page=fluent_forms_settings#general-insightly-settings',
344 'tags' => ['global integrations', 'insightly'],
345 ],
346 [
347 'title' => 'Global Settings > Configure Integration -> Notion',
348 'icon' => '',
349 'path' => '?page=fluent_forms_settings#general-notion-settings',
350 'tags' => ['global integrations', 'notion'],
351 ],
352 [
353 'title' => 'Global Settings > Configure Integration -> Airtable v2',
354 'icon' => '',
355 'path' => '?page=fluent_forms_settings#general-airtable_v2-settings',
356 'tags' => ['global integrations', 'airtable'],
357 ],
358 [
359 'title' => 'Global Settings > Configure Integration -> Constant Contact V3',
360 'icon' => '',
361 'path' => '?page=fluent_forms_settings#general-constatantcontactv3-settings',
362 'tags' => ['global integrations', 'constantcontactv3', 'constant contact'],
363 ],
364 [
365 'title' => 'Global Settings > Configure Integration -> OpenAI',
366 'icon' => '',
367 'path' => '?page=fluent_forms_settings#general-openai-settings',
368 'tags' => ['global integrations', 'openai', 'chatgpt', 'ai'],
369 ],
370 ]);
371 }
372
373 if (defined('FLUENTFORM_PDF_VERSION')) {
374 $links = array_merge($links, [
375 [
376 'title' => 'Global Settings > Configure Integration -> PDF Settings',
377 'icon' => '',
378 'path' => '?page=fluent_forms_settings#pdf_settings',
379 'tags' => ['global integrations', 'pdf settings'],
380 ],
381 [
382 'title' => 'Integrations -> Fluent Forms PDF',
383 'icon' => '',
384 'path' => '?page=fluent_forms_add_ons&sub_page=fluentform_pdf',
385 'tags' => ['pdf', 'modules'],
386 ],
387 ]);
388 }
389
390 $allowedForms = FormManagerService::getUserAllowedFormsScope();
391 $forms = Form::where('status', 'published')
392 ->when(false !== $allowedForms, function ($q) use ($allowedForms) {
393 $q->whereIn('id', $allowedForms ?: [0]);
394 })
395 ->select(['id', 'title', 'type'])->get();
396 if (count($forms) > 0) {
397 foreach ($forms as $form) {
398 $formSpecificLinks = [
399 [
400 'title' => "Forms > $form->title > Editor",
401 'icon' => '',
402 'path' => "?page=fluent_forms&form_id=$form->id&route=editor",
403 'tags' => ['editor', "$form->id", $form->title],
404 ],
405 [
406 'title' => "Forms > $form->title > Entries",
407 'icon' => '',
408 'path' => "?page=fluent_forms&form_id=$form->id&route=entries#/?sort_by=DESC&type=&page=1",
409 'tags' => ['entries', "$form->id", $form->title],
410 ],
411 [
412 'title' => "Forms > $form->title > Entries > Visual Reports",
413 'icon' => '',
414 'path' => "?page=fluent_forms&form_id=$form->id&route=entries#/visual_reports",
415 'tags' => ['entries', 'visual reports', "$form->id", $form->title],
416 ],
417 [
418 'title' => "Forms > $form->title > Settings & Integrations > Settings",
419 'icon' => '',
420 'path' => "?page=fluent_forms&form_id=$form->id&route=settings&sub_route=form_settings#/",
421 'tags' => ['settings and integrations', "$form->id", $form->title],
422 ],
423 [
424 'title' => "Forms > $form->title > Settings & Integrations > Slack",
425 'icon' => '',
426 'path' => "?page=fluent_forms&form_id=$form->id&route=settings&sub_route=form_settings#/slack",
427 'tags' => ['slack', "$form->id", $form->title],
428 ],
429 [
430 'title' => "Forms > $form->title > Settings & Integrations > Custom CSS/JS",
431 'icon' => '',
432 'path' => "?page=fluent_forms&form_id=$form->id&route=settings&sub_route=form_settings#/custom-css-js",
433 'tags' => ['custom', 'CSS/JS', 'css javascript', "$form->id", $form->title],
434 ],
435 [
436 'title' => "Forms > $form->title > Settings & Integrations > Configure Integrations",
437 'icon' => '',
438 'path' => "?page=fluent_forms&form_id=$form->id&route=settings&sub_route=form_settings#/all-integrations",
439 'tags' => ['configure integrations', "$form->id", $form->title],
440 ],
441 [
442 'title' => "Forms > $form->title > Preview",
443 'icon' => '',
444 'type' => 'preview',
445 'path' => "?fluent_forms_pages=1&design_mode=1&preview_id=$form->id#ff_preview",
446 'tags' => ['preview ', "$form->id", $form->title],
447 ],
448 ];
449 if (defined('FLUENTFORMPRO')) {
450 $formSpecificLinks = array_merge($formSpecificLinks, [
451 [
452 'title' => "Forms > $form->title > Settings & Integrations > Landing Page",
453 'icon' => '',
454 'path' => "?page=fluent_forms&form_id=$form->id&route=settings&sub_route=form_settings#/landing_pages",
455 'tags' => ['landing pages', "$form->id", $form->title],
456 ],
457 [
458 'title' => "Forms > $form->title > Settings & Integrations > Conditional Confirmations",
459 'icon' => '',
460 'path' => "?page=fluent_forms&form_id=$form->id&route=settings&sub_route=form_settings#/conditional-confirmations",
461 'tags' => ['conditional confirmations', "$form->id", $form->title],
462 ],
463 [
464 'title' => "Forms > $form->title > Settings & Integrations > Email Notifications",
465 'icon' => '',
466 'path' => "?page=fluent_forms&form_id=$form->id&route=settings&sub_route=form_settings#/email-settings",
467 'tags' => ['email notifications', "$form->id", $form->title],
468 ],
469 [
470 'title' => "Forms > $form->title > Settings & Integrations > Zapier",
471 'icon' => '',
472 'path' => "?page=fluent_forms&form_id=$form->id&route=settings&sub_route=form_settings#/zapier",
473 'tags' => ['zapier', "$form->id", $form->title],
474 ],
475 [
476 'title' => "Forms > $form->title > Settings & Integrations > Webhook",
477 'icon' => '',
478 'path' => "?page=fluent_forms&form_id=$form->id&route=settings&sub_route=form_settings#/webhook",
479 'tags' => ['webhook', "$form->id", $form->title],
480 ],
481 [
482 'title' => "Forms > $form->title > Settings & Integrations > Quiz Settings",
483 'icon' => '',
484 'path' => "?page=fluent_forms&form_id=$form->id&route=settings&sub_route=form_settings#/quiz_settings",
485 'tags' => ['quiz', "$form->id", $form->title],
486 ],
487 ]);
488 }
489 if (defined('FLUENTFORM_PDF_VERSION')) {
490 $formSpecificLinks[] = [
491 'title' => "Forms > $form->title > Settings & Integrations > PDF Feeds",
492 'icon' => '',
493 'path' => "?page=fluent_forms&form_id=$form->id&route=settings&sub_route=form_settings#/pdf-feeds",
494 'tags' => ['pdf feeds', "$form->id", $form->title],
495 ];
496 }
497
498 if (defined('FLUENTFORMPRO') && 'post' === $form->type) {
499 $formSpecificLinks[] = [
500 'title' => "Forms > $form->title > Settings & Integrations > Post Feeds",
501 'icon' => '',
502 'path' => "?page=fluent_forms&form_id=$form->id&route=settings&sub_route=form_settings#/post-feeds",
503 'tags' => ['post feeds', "$form->id", $form->title],
504 ];
505 }
506 if (Helper::isConversionForm($form->id)) {
507 $formSpecificLinks[] = [
508 'title' => "Forms > $form->title > Design",
509 'icon' => '',
510 'path' => "?page=fluent_forms&form_id=$form->id&route=conversational_design",
511 'tags' => ['conversational design', "$form->id", $form->title],
512 ];
513 $formSpecificLinks[] = [
514 'title' => "Forms > $form->title > Conversational Preview",
515 'icon' => '',
516 'type' => 'preview',
517 'path' => "?fluent-form=$form->id",
518 'tags' => ['preview', 'conversational', "$form->id", $form->title],
519 ];
520 }
521 $links = array_merge($links, $formSpecificLinks);
522 }
523 }
524 return [
525 'links' => apply_filters('fluentform/global_search_links', $links),
526 'admin_url' => get_admin_url(null, 'admin.php'),
527 'site_url' => site_url(),
528 ];
529 }
530 }
531