PluginProbe
Elementor Website Builder – more than just a page builder / 4.0.0
Elementor Website Builder – more than just a page builder v4.0.0
4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 4.0.7 All 451 releases
elementor / modules / atomic-widgets / styles / style-variant.php

style-variant.php in Elementor Website Builder – more than just a page builder 4.0.0, at modules/atomic-widgets/styles/style-variant.php

46 lines 898 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Elementor\Modules\AtomicWidgets\Styles;
4
5 class Style_Variant {
6 private ?string $breakpoint = null;
7 private ?string $state = null;
8
9 /** @var array<string, array> */
10 private array $props = [];
11
12 public static function make(): self {
13 return new self();
14 }
15
16 public function set_breakpoint( string $breakpoint ): self {
17 $this->breakpoint = $breakpoint;
18 return $this;
19 }
20
21 public function set_state( string $state ): self {
22 $this->state = $state;
23 return $this;
24 }
25
26 public function add_prop( string $key, $value ): self {
27 $this->props[ $key ] = $value;
28 return $this;
29 }
30
31 public function add_props( array $props ): self {
32 $this->props = array_merge( $this->props, $props );
33 return $this;
34 }
35
36 public function build(): array {
37 return [
38 'meta' => [
39 'breakpoint' => $this->breakpoint,
40 'state' => $this->state,
41 ],
42 'props' => $this->props,
43 ];
44 }
45 }
46