← All changes
|
modules/atomic-widgets/elements/div-block/div-block.php
+9
-0
4.0.9
→
4.1.0-beta1
View file →
| @@ -1,8 +1,9 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | namespace Elementor\Modules\AtomicWidgets\Elements\Div_Block; |
| 3 | 3 | |
| 4 | 4 | use Elementor\Modules\AtomicWidgets\Elements\Base\Atomic_Element_Base; |
| 5 | +use Elementor\Modules\AtomicWidgets\Elements\Base\Has_Element_Template; | |
| 5 | 6 | use Elementor\Modules\AtomicWidgets\PropTypes\Primitives\String_Prop_Type; |
| 6 | 7 | use Elementor\Modules\AtomicWidgets\PropTypes\Size_Prop_Type; |
| 7 | 8 | use Elementor\Modules\AtomicWidgets\Styles\Style_Definition; |
| 8 | 9 | use Elementor\Modules\AtomicWidgets\PropTypes\Attributes_Prop_Type; |
| @@ -20,8 +21,10 @@ | ||
| 20 | 21 | exit; // Exit if accessed directly. |
| 21 | 22 | } |
| 22 | 23 | |
| 23 | 24 | class Div_Block extends Atomic_Element_Base { |
| 25 | + use Has_Element_Template; | |
| 26 | + | |
| 24 | 27 | const BASE_STYLE_KEY = 'base'; |
| 25 | 28 | |
| 26 | 29 | public function __construct( $data = [], $args = null ) { |
| 27 | 30 | parent::__construct( $data, $args ); |
| @@ -182,6 +185,12 @@ | ||
| 182 | 185 | $attributes = array_merge( $attributes, $link_attributes ); |
| 183 | 186 | } |
| 184 | 187 | |
| 185 | 188 | $this->add_render_attribute( '_wrapper', array_merge( $initial_attributes, $attributes ) ); |
| 189 | + } | |
| 190 | + | |
| 191 | + protected function get_templates(): array { | |
| 192 | + return [ | |
| 193 | + 'elementor/elements/div-block' => __DIR__ . '/div-block.html.twig', | |
| 194 | + ]; | |
| 186 | 195 | } |
| 187 | 196 | } |