1 | <?php namespace nyx\notify\transports\slack\message\attachment\actions; |
||
19 | class Confirmation implements core\interfaces\Serializable |
||
20 | { |
||
21 | /** |
||
22 | * The traits of a Confirmation Action. |
||
23 | */ |
||
24 | use core\traits\Serializable; |
||
25 | |||
26 | /** |
||
27 | * @var string The title of the pop up window. Optional. |
||
28 | */ |
||
29 | protected $title; |
||
30 | |||
31 | /** |
||
32 | * @var string The description and context of the action about to be performed or cancelled. Required. |
||
33 | */ |
||
34 | protected $text; |
||
35 | |||
36 | /** |
||
37 | * @var string The text label for the button to continue with an action. Optional, defaults to "Okay". |
||
38 | */ |
||
39 | protected $okText; |
||
40 | |||
41 | /** |
||
42 | * @var string The text label for the button to cancel the action. Optional, defaults to "Cancel". |
||
43 | */ |
||
44 | protected $dismissText; |
||
45 | |||
46 | /** |
||
47 | * Creates a new Confirmation instance. |
||
48 | * |
||
49 | * @param array $attributes |
||
50 | */ |
||
51 | public function __construct(array $attributes) |
||
57 | |||
58 | /** |
||
59 | * Sets the attributes of this Confirmation. |
||
60 | * |
||
61 | * @param array $attributes |
||
62 | * @return $this |
||
63 | */ |
||
64 | public function setAttributes(array $attributes) : Confirmation |
||
84 | |||
85 | /** |
||
86 | * Returns the title of the pop up window. |
||
87 | * |
||
88 | * @return string |
||
89 | */ |
||
90 | public function getTitle() |
||
94 | |||
95 | /** |
||
96 | * Sets the title of the pop up window. |
||
97 | * |
||
98 | * @param string $title |
||
99 | * @return $this |
||
100 | */ |
||
101 | public function setTitle(string $title) : Confirmation |
||
107 | |||
108 | /** |
||
109 | * Returns the description and context of the action about to be performed or cancelled. |
||
110 | * |
||
111 | * @return string |
||
112 | */ |
||
113 | public function getText() |
||
117 | |||
118 | /** |
||
119 | * Sets the description and context of the action about to be performed or cancelled. |
||
120 | * |
||
121 | * @param string $text |
||
122 | * @return $this |
||
123 | */ |
||
124 | public function setText(string $text) : Confirmation |
||
130 | |||
131 | /** |
||
132 | * Returns the text label for the button to continue with an action. |
||
133 | * |
||
134 | * @return string |
||
135 | */ |
||
136 | public function getOkText() |
||
140 | |||
141 | /** |
||
142 | * Sets the text label for the button to continue with an action. |
||
143 | * |
||
144 | * @param string $okText |
||
145 | * @return $this |
||
146 | */ |
||
147 | public function setOkText(string $okText) |
||
153 | |||
154 | /** |
||
155 | * Returns the text label for the button to cancel the action. |
||
156 | * |
||
157 | * @return string |
||
158 | */ |
||
159 | public function getDismissText() |
||
163 | |||
164 | /** |
||
165 | * Sets the text label for the button to cancel the action. |
||
166 | * |
||
167 | * @param string $dismissText |
||
168 | * @return $this |
||
169 | */ |
||
170 | public function setDismissText(string $dismissText) |
||
176 | |||
177 | /** |
||
178 | * {@inheritDoc} |
||
179 | */ |
||
180 | public function unserialize($data) |
||
184 | |||
185 | /** |
||
186 | * {@inheritDoc} |
||
187 | */ |
||
188 | public function toArray() : array |
||
197 | } |
||
198 |