| 1 |
<?php |
| 2 |
|
| 3 |
namespace Elementor\Modules\AtomicWidgets\Elements; |
| 4 |
|
| 5 |
class Widget_Builder extends Element_Builder { |
| 6 |
private $widget_type; |
| 7 |
|
| 8 |
public static function make( $widget_type ) { |
| 9 |
return new self( $widget_type ); |
| 10 |
} |
| 11 |
|
| 12 |
private function __construct( $widget_type ) { |
| 13 |
$this->widget_type = $widget_type; |
| 14 |
$this->element_type = 'widget'; |
| 15 |
} |
| 16 |
|
| 17 |
public function build() { |
| 18 |
return [ |
| 19 |
'elType' => 'widget', |
| 20 |
'widgetType' => $this->widget_type, |
| 21 |
'elementType' => $this->element_type, |
| 22 |
'settings' => $this->settings, |
| 23 |
'isLocked' => $this->is_locked, |
| 24 |
]; |
| 25 |
} |
| 26 |
} |
| 27 |
|