PluginProbe
Elementor Website Builder – more than just a page builder / 3.27.5
Elementor Website Builder – more than just a page builder v3.27.5
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 / controls / section.php

section.php in Elementor Website Builder – more than just a page builder 3.27.5, at modules/atomic-widgets/controls/section.php

52 lines 929 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace Elementor\Modules\AtomicWidgets\Controls;
3
4 use JsonSerializable;
5
6 if ( ! defined( 'ABSPATH' ) ) {
7 exit; // Exit if accessed directly
8 }
9
10 class Section implements JsonSerializable {
11 private $label = null;
12 private $description = null;
13 private array $items = [];
14
15 public static function make(): self {
16 return new static();
17 }
18
19 public function set_label( string $label ): self {
20 $this->label = $label;
21
22 return $this;
23 }
24
25 public function set_description( string $description ): self {
26 $this->description = $description;
27
28 return $this;
29 }
30
31 public function set_items( array $items ): self {
32 $this->items = $items;
33
34 return $this;
35 }
36
37 public function get_items() {
38 return $this->items;
39 }
40
41 public function jsonSerialize(): array {
42 return [
43 'type' => 'section',
44 'value' => [
45 'label' => $this->label,
46 'description' => $this->description,
47 'items' => $this->items,
48 ],
49 ];
50 }
51 }
52