PluginProbe
Elementor Website Builder – more than just a page builder / 4.0.8
Elementor Website Builder – more than just a page builder v4.0.8
4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 4.0.7 All 451 releases
elementor / modules / atomic-widgets / elements / base / widget-builder.php

widget-builder.php in Elementor Website Builder – more than just a page builder 4.0.8, at modules/atomic-widgets/elements/base/widget-builder.php

46 lines 976 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Elementor\Modules\AtomicWidgets\Elements\Base;
4
5 class Widget_Builder {
6 protected $widget_type;
7 protected $settings = [];
8 protected $is_locked = false;
9 protected $editor_settings = [];
10
11 public static function make( string $widget_type ) {
12 return new self( $widget_type );
13 }
14
15 private function __construct( string $widget_type ) {
16 $this->widget_type = $widget_type;
17 }
18
19 public function settings( array $settings ) {
20 $this->settings = $settings;
21 return $this;
22 }
23
24 public function is_locked( $is_locked ) {
25 $this->is_locked = $is_locked;
26 return $this;
27 }
28
29 public function editor_settings( array $editor_settings ) {
30 $this->editor_settings = $editor_settings;
31 return $this;
32 }
33
34 public function build() {
35 $widget_data = [
36 'elType' => 'widget',
37 'widgetType' => $this->widget_type,
38 'settings' => $this->settings,
39 'isLocked' => $this->is_locked,
40 'editor_settings' => $this->editor_settings,
41 ];
42
43 return $widget_data;
44 }
45 }
46