Total Complexity | 8 |
Total Lines | 86 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
19 | final class ActionConfirmation |
||
20 | { |
||
21 | /** |
||
22 | * The required title for the pop up window. |
||
23 | * |
||
24 | * @var string |
||
25 | */ |
||
26 | private $title; |
||
27 | |||
28 | /** |
||
29 | * The required description. |
||
30 | * |
||
31 | * @var string |
||
32 | */ |
||
33 | private $text; |
||
34 | |||
35 | /** |
||
36 | * The text label for the OK button. |
||
37 | * |
||
38 | * @var string|null |
||
39 | */ |
||
40 | private $okText; |
||
41 | |||
42 | /** |
||
43 | * The text label for the Cancel button. |
||
44 | * |
||
45 | * @var string|null |
||
46 | */ |
||
47 | private $dismissText; |
||
48 | |||
49 | public function __construct(string $title, string $text) |
||
50 | { |
||
51 | $this->title = $title; |
||
52 | $this->text = $text; |
||
53 | } |
||
54 | |||
55 | public function getTitle(): string |
||
56 | { |
||
57 | return $this->title; |
||
58 | } |
||
59 | |||
60 | public function getText(): string |
||
61 | { |
||
62 | return $this->text; |
||
63 | } |
||
64 | |||
65 | public function getOkText(): ?string |
||
66 | { |
||
67 | return $this->okText; |
||
68 | } |
||
69 | |||
70 | /** |
||
71 | * @return ActionConfirmation |
||
72 | */ |
||
73 | public function setOkText(?string $okText): self |
||
74 | { |
||
75 | $this->okText = $okText; |
||
76 | |||
77 | return $this; |
||
78 | } |
||
79 | |||
80 | public function getDismissText(): ?string |
||
83 | } |
||
84 | |||
85 | /** |
||
86 | * @return ActionConfirmation |
||
87 | */ |
||
88 | public function setDismissText(?string $dismissText): self |
||
89 | { |
||
90 | $this->dismissText = $dismissText; |
||
91 | |||
92 | return $this; |
||
93 | } |
||
94 | |||
95 | /** |
||
96 | * Get the array representation of this action confirmation. |
||
97 | */ |
||
98 | public function toArray(): array |
||
105 | ]; |
||
106 | } |
||
107 | } |
||
108 |