| 1 |
<?php |
| 2 |
|
| 3 |
namespace HelloPlus\Classes; |
| 4 |
|
| 5 |
if ( ! defined( 'ABSPATH' ) ) { |
| 6 |
exit; // Exit if accessed directly. |
| 7 |
} |
| 8 |
|
| 9 |
use Elementor\Widget_Base; |
| 10 |
abstract class Render_Base implements Renderable { |
| 11 |
protected Widget_Base $widget; |
| 12 |
|
| 13 |
protected array $settings; |
| 14 |
|
| 15 |
protected string $layout_classname; |
| 16 |
|
| 17 |
|
| 18 |
abstract public function render(): void; |
| 19 |
|
| 20 |
protected function get_class_name( string $suffix ): string { |
| 21 |
return $this->layout_classname . $suffix; |
| 22 |
} |
| 23 |
|
| 24 |
public function __construct( Widget_Base $widget, string $layout_classname ) { |
| 25 |
$this->widget = $widget; |
| 26 |
$this->settings = $widget->get_settings_for_display(); |
| 27 |
$this->layout_classname = $layout_classname; |
| 28 |
} |
| 29 |
} |
| 30 |
|