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.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 / Providers / CommonProvider.php

CommonProvider.php in Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder 4.3.6, at app/Providers/CommonProvider.php

53 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * This provider will be loaded always (admin/public)
5 */
6
7 namespace FluentForm\App\Providers;
8
9 use FluentForm\Framework\Foundation\Provider;
10
11 class CommonProvider extends Provider
12 {
13 /**
14 * The provider booting method to boot this provider
15 * @return void
16 */
17 public function booting()
18 {
19 // ...
20 }
21
22 /**
23 * The provider booted method to be called after booting
24 * @return void
25 */
26 public function booted()
27 {
28 /**
29 * Fire fluentform-loaded event when app is ready.
30 * The ready event will be fired by framework once
31 * the framework is booted and the app (plugin) is
32 * completely ready.
33 */
34 $this->app->ready(function($app) {
35 $app->addAction('init', function() use ($app) {
36 $app->doAction('fluentform-loaded', $app);
37 });
38 });
39
40 /**
41 * Register "admin_init" hook to run before ajax callbacks
42 */
43 $this->app->addAction('admin_init', function() {
44 if (defined('DOING_AJAX') && DOING_AJAX) {
45 $action = $this->app->request->get('action');
46 if($this->app->has("__ajax_before__{$action}")) {
47 $callback = $this->app->make("__ajax_before__{$action}");
48 return $callback($this->app);
49 }
50 }
51 });
52 }
53 }