| @@ -1,8 +1,9 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | namespace Elementor\Modules\AtomicWidgets\Elements\Flexbox; |
| 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\PropDependencies\Manager as Dependency_Manager; |
| 6 | 7 | use Elementor\Modules\AtomicWidgets\PropTypes\Primitives\String_Prop_Type; |
| 7 | 8 | use Elementor\Modules\AtomicWidgets\PropTypes\Size_Prop_Type; |
| 8 | 9 | use Elementor\Modules\AtomicWidgets\Styles\Style_Definition; |
| @@ -20,8 +21,10 @@ | ||
| 20 | 21 | exit; // Exit if accessed directly. |
| 21 | 22 | } |
| 22 | 23 | |
| 23 | 24 | class Flexbox 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 ); |
| @@ -179,6 +182,12 @@ | ||
| 179 | 182 | $attributes = array_merge( $attributes, $link_attributes ); |
| 180 | 183 | } |
| 181 | 184 | |
| 182 | 185 | $this->add_render_attribute( '_wrapper', array_merge( $initial_attributes, $attributes ) ); |
| 186 | + } | |
| 187 | + | |
| 188 | + protected function get_templates(): array { | |
| 189 | + return [ | |
| 190 | + 'elementor/elements/flexbox' => __DIR__ . '/flexbox.html.twig', | |
| 191 | + ]; | |
| 183 | 192 | } |
| 184 | 193 | } |