PluginProbe ʕ •ᴥ•ʔ
JetFormBuilder — Dynamic Blocks Form Builder / 2.1.5
JetFormBuilder — Dynamic Blocks Form Builder v2.1.5
3.6.3.1 3.6.3 3.6.2.2 3.6.2.1 3.6.2 3.6.1.1 3.6.1 3.6.0.1 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.4.1 1.4.2 1.4.3 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.1.0 2.1.1 2.1.10 2.1.11 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 3.0.0 3.0.0.1 3.0.0.2 3.0.0.3 3.0.1 3.0.1.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.0.1 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 3.2.0 3.2.1 3.2.2 3.2.3 3.3.0 3.3.1 3.3.2 3.3.3 3.3.3.1 3.3.4 3.3.4.1 3.3.4.2 3.4.0 3.4.1 3.4.2 3.4.3 3.4.4 3.4.5 3.4.5.1 3.4.5.2 3.4.6 3.4.7 3.4.7.1 3.5.0 3.5.1 3.5.1.1 3.5.1.2 3.5.2 3.5.2.1 3.5.3 3.5.4 3.5.5 3.5.6 3.5.6.1 3.5.6.2 3.5.6.3 3.6.0
jetformbuilder / includes / compatibility / jet-engine / jet-engine.php
jetformbuilder / includes / compatibility / jet-engine Last commit date
actions 3 years ago blocks 3 years ago generators 3 years ago methods 3 years ago parsers 3 years ago preset-sources 3 years ago jet-engine.php 3 years ago
jet-engine.php
94 lines
1 <?php
2
3
4 namespace Jet_Form_Builder\Compatibility\Jet_Engine;
5
6
7 use Jet_Form_Builder\Actions\Methods\Object_Properties_Collection;
8 use Jet_Form_Builder\Blocks\Manager;
9 use Jet_Form_Builder\Compatibility\Jet_Engine\Actions\Update_Options;
10 use Jet_Form_Builder\Compatibility\Jet_Engine\Blocks\Map_Field;
11 use Jet_Form_Builder\Compatibility\Jet_Engine\Generators\Get_From_Field;
12 use Jet_Form_Builder\Compatibility\Jet_Engine\Generators\Get_From_Je_Query;
13 use Jet_Form_Builder\Compatibility\Jet_Engine\Methods\Post_Modification\Post_Je_Relation_Property;
14 use Jet_Form_Builder\Compatibility\Jet_Engine\Parsers\Map_Field_Parser;
15 use Jet_Form_Builder\Compatibility\Jet_Engine\Preset_Sources\Preset_Source_Options_Page;
16
17 class Jet_Engine {
18
19 public static function register() {
20 if ( ! function_exists( 'jet_engine' ) ) {
21 return;
22 }
23 new static();
24 }
25
26 private function __construct() {
27 add_filter(
28 'jet-form-builder/preset/source-types',
29 array( $this, 'add_sources' )
30 );
31 add_filter(
32 'jet-form-builder/forms/options-generators',
33 array( $this, 'add_generators' )
34 );
35 add_filter(
36 'jet-form-builder/parsers-request/register',
37 array( $this, 'add_parsers' )
38 );
39 add_filter(
40 'jet-form-builder/blocks/items',
41 array( $this, 'add_blocks' ), 0
42 );
43 add_action(
44 'jet-form-builder/actions/register',
45 array( $this, 'add_actions' )
46 );
47
48 if ( jet_engine()->relations ) {
49 add_filter(
50 'jet-form-builder/post-modifier/object-properties',
51 array( $this, 'add_post_properties' )
52 );
53 }
54 }
55
56 public function add_sources( array $sources ): array {
57 $sources[] = new Preset_Source_Options_Page();
58
59 return $sources;
60 }
61
62 public function add_generators( array $generators ): array {
63 array_push(
64 $generators,
65 new Get_From_Field(),
66 new Get_From_Je_Query()
67 );
68
69 return $generators;
70 }
71
72 public function add_parsers( array $parsers ): array {
73 $parsers[] = new Map_Field_Parser();
74
75 return $parsers;
76 }
77
78 public function add_blocks( array $blocks ): array {
79 $blocks[] = new Map_Field();
80
81 return $blocks;
82 }
83
84 public function add_actions( \Jet_Form_Builder\Actions\Manager $manager ) {
85 $manager->register_action_type( new Update_Options() );
86 }
87
88 public function add_post_properties(
89 Object_Properties_Collection $collection
90 ): Object_Properties_Collection {
91 return $collection->add( new Post_Je_Relation_Property() );
92 }
93
94 }