PluginProbe
The Innovative Form Builder – IvyForms / 1.5.1
The Innovative Form Builder – IvyForms v1.5.1
1.5.1 1.5 1.4.1 1.4 trunk 0.1.2 0.2 0.2.1 0.3 0.3.1 0.4 0.5 0.6 0.6.1 0.6.1-backup 0.6.1.1 0.7 0.8 0.8.1 0.8.2 0.9 0.9.1 1.0 1.1 1.1.1 All 27 releases
ivyforms / backend / src / ValueObjects / Field / FieldOptions.php

FieldOptions.php in The Innovative Form Builder – IvyForms 1.5.1, at backend/src/ValueObjects/Field/FieldOptions.php

47 lines 866 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace IvyForms\ValueObjects\Field;
4
5 /**
6 * Class FieldOptions
7 *
8 * Encapsulates options for a field.
9 */
10 final class FieldOptions
11 {
12 /**
13 * @var array<int, array<string, int|string|bool>>
14 */
15 private array $options;
16
17 /**
18 * FieldOptions constructor.
19 *
20 * @param array<int, array<string, int|string|bool>> $options
21 */
22 public function __construct(array $options)
23 {
24 $this->options = $options;
25 }
26
27 /**
28 * Get the options array.
29 *
30 * @return array<int, array<string, int|string|bool>>
31 */
32 public function getOptions(): array
33 {
34 return $this->options;
35 }
36
37 /**
38 * Convert the field options to an array.
39 *
40 * @return array<int, array<string, int|string|bool>>
41 */
42 public function toArray(): array
43 {
44 return $this->options;
45 }
46 }
47