PluginProbe
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder / 6.2.10
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder v6.2.10
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.10, at app/Services/GlobalSearchService.php

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