| 1 |
<?php |
| 2 |
/** |
| 3 |
* Wishlist class. |
| 4 |
* |
| 5 |
* @package RadiusTheme\SB |
| 6 |
*/ |
| 7 |
|
| 8 |
namespace RadiusTheme\SB\Elementor\Widgets\General; |
| 9 |
|
| 10 |
use RadiusTheme\SB\Helpers\Fns; |
| 11 |
use RadiusTheme\SB\Abstracts\ElementorWidgetBase; |
| 12 |
use RadiusTheme\SB\Elementor\Widgets\Controls\WishlistSettings; |
| 13 |
|
| 14 |
// Do not allow directly accessing this file. |
| 15 |
if ( ! defined( 'ABSPATH' ) ) { |
| 16 |
exit( 'This script cannot be accessed directly.' ); |
| 17 |
} |
| 18 |
|
| 19 |
/** |
| 20 |
* ProductsList class. |
| 21 |
*/ |
| 22 |
class Wishlist extends ElementorWidgetBase { |
| 23 |
/** |
| 24 |
* Construct function |
| 25 |
* |
| 26 |
* @param array $data default array. |
| 27 |
* @param mixed $args default arg. |
| 28 |
*/ |
| 29 |
public function __construct( $data = [], $args = null ) { |
| 30 |
$this->rtsb_name = esc_html__( 'Wishlist Table', 'shopbuilder' ); |
| 31 |
$this->rtsb_base = 'rtsb-wishlist'; |
| 32 |
|
| 33 |
parent::__construct( $data, $args ); |
| 34 |
|
| 35 |
$this->rtsb_category = 'rtsb-shopbuilder-general'; |
| 36 |
} |
| 37 |
|
| 38 |
|
| 39 |
/** |
| 40 |
* Widget Field |
| 41 |
* |
| 42 |
* @return void|array |
| 43 |
*/ |
| 44 |
public function widget_fields() { |
| 45 |
return WishlistSettings::settings_field( $this ); |
| 46 |
} |
| 47 |
|
| 48 |
/** |
| 49 |
* Render Function |
| 50 |
* |
| 51 |
* @return void |
| 52 |
*/ |
| 53 |
protected function render() { |
| 54 |
$controllers = $this->get_settings_for_display(); |
| 55 |
$this->theme_support(); |
| 56 |
$data = [ |
| 57 |
'template' => 'elementor/general/wishlist', |
| 58 |
'controllers' => $controllers, |
| 59 |
]; |
| 60 |
|
| 61 |
Fns::load_template( $data['template'], $data ); |
| 62 |
|
| 63 |
$this->theme_support( 'render_reset' ); |
| 64 |
} |
| 65 |
|
| 66 |
} |
| 67 |
|