← All changes
|
modules/atomic-widgets/elements/base/element-builder.php
+0
-14
4.3.0
→
4.2.1
View file →
| @@ -8,9 +8,8 @@ | ||
| 8 | 8 | protected $is_locked = false; |
| 9 | 9 | protected $children = []; |
| 10 | 10 | protected $editor_settings = []; |
| 11 | 11 | protected $meta = []; |
| 12 | - protected $hydrate_default_children = false; | |
| 13 | 12 | |
| 14 | 13 | public static function make( string $element_type ) { |
| 15 | 14 | return new self( $element_type ); |
| 16 | 15 | } |
| @@ -43,17 +42,8 @@ | ||
| 43 | 42 | $this->meta = $meta; |
| 44 | 43 | return $this; |
| 45 | 44 | } |
| 46 | 45 | |
| 47 | - /** | |
| 48 | - * Marks this payload to seed its default children client-side (via | |
| 49 | - * `AtomicElementBaseModel::onElementCreate()`) once inserted into the editor. | |
| 50 | - */ | |
| 51 | - public function hydrate_default_children( bool $hydrate = true ) { | |
| 52 | - $this->hydrate_default_children = $hydrate; | |
| 53 | - return $this; | |
| 54 | - } | |
| 55 | - | |
| 56 | 46 | public function build() { |
| 57 | 47 | $element_data = [ |
| 58 | 48 | 'elType' => $this->element_type, |
| 59 | 49 | 'settings' => $this->settings, |
| @@ -63,12 +53,8 @@ | ||
| 63 | 53 | ]; |
| 64 | 54 | |
| 65 | 55 | if ( ! empty( $this->meta ) ) { |
| 66 | 56 | $element_data['meta'] = $this->meta; |
| 67 | - } | |
| 68 | - | |
| 69 | - if ( $this->hydrate_default_children ) { | |
| 70 | - $element_data['hydrateDefaultChildren'] = true; | |
| 71 | 57 | } |
| 72 | 58 | |
| 73 | 59 | return $element_data; |
| 74 | 60 | } |