← All changes
|
modules/atomic-widgets/elements/base/element-builder.php
+0
-24
4.3.0-beta3
→
4.0.3
View file →
| @@ -7,10 +7,8 @@ | ||
| 7 | 7 | protected $settings = []; |
| 8 | 8 | protected $is_locked = false; |
| 9 | 9 | protected $children = []; |
| 10 | 10 | protected $editor_settings = []; |
| 11 | - protected $meta = []; | |
| 12 | - protected $hydrate_default_children = false; | |
| 13 | 11 | |
| 14 | 12 | public static function make( string $element_type ) { |
| 15 | 13 | return new self( $element_type ); |
| 16 | 14 | } |
| @@ -38,22 +36,8 @@ | ||
| 38 | 36 | $this->children = $children; |
| 39 | 37 | return $this; |
| 40 | 38 | } |
| 41 | 39 | |
| 42 | - public function meta( array $meta ) { | |
| 43 | - $this->meta = $meta; | |
| 44 | - return $this; | |
| 45 | - } | |
| 46 | - | |
| 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 | 40 | public function build() { |
| 57 | 41 | $element_data = [ |
| 58 | 42 | 'elType' => $this->element_type, |
| 59 | 43 | 'settings' => $this->settings, |
| @@ -60,16 +44,8 @@ | ||
| 60 | 44 | 'isLocked' => $this->is_locked, |
| 61 | 45 | 'editor_settings' => $this->editor_settings, |
| 62 | 46 | 'elements' => $this->children, |
| 63 | 47 | ]; |
| 64 | - | |
| 65 | - if ( ! empty( $this->meta ) ) { | |
| 66 | - $element_data['meta'] = $this->meta; | |
| 67 | - } | |
| 68 | - | |
| 69 | - if ( $this->hydrate_default_children ) { | |
| 70 | - $element_data['hydrateDefaultChildren'] = true; | |
| 71 | - } | |
| 72 | 48 | |
| 73 | 49 | return $element_data; |
| 74 | 50 | } |
| 75 | 51 | } |