PluginProbe
The Innovative Form Builder – IvyForms / 1.1.1
The Innovative Form Builder – IvyForms v1.1.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 / Form / FormSettings.php

FormSettings.php in The Innovative Form Builder – IvyForms 1.1.1, at backend/src/ValueObjects/Form/FormSettings.php

83 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace IvyForms\ValueObjects\Form;
4
5 /**
6 * Class FormSettings
7 * Groups display and behavior settings for a form
8 *
9 * @package IvyForms\ValueObjects\Form
10 */
11 final class FormSettings
12 {
13 /**
14 * @var bool
15 */
16 public bool $showTitle;
17
18 /**
19 * @var bool
20 */
21 public bool $showDescription;
22
23 /**
24 * @var bool
25 */
26 public bool $storeEntries;
27
28 /**
29 * FormSettings constructor.
30 *
31 * @param bool $showTitle
32 * @param bool $showDescription
33 * @param bool $storeEntries
34 */
35 public function __construct(
36 bool $showTitle,
37 bool $showDescription,
38 bool $storeEntries
39 ) {
40 $this->showTitle = $showTitle;
41 $this->showDescription = $showDescription;
42 $this->storeEntries = $storeEntries;
43 }
44
45 /**
46 * @return bool
47 */
48 public function isShowTitle(): bool
49 {
50 return $this->showTitle;
51 }
52
53 /**
54 * @return bool
55 */
56 public function isShowDescription(): bool
57 {
58 return $this->showDescription;
59 }
60
61 /**
62 * @return bool
63 */
64 public function isStoreEntries(): bool
65 {
66 return $this->storeEntries;
67 }
68
69 /**
70 * Convert to array
71 *
72 * @return array<string, bool>
73 */
74 public function toArray(): array
75 {
76 return [
77 'showTitle' => $this->showTitle,
78 'showDescription' => $this->showDescription,
79 'storeEntries' => $this->storeEntries,
80 ];
81 }
82 }
83