1 | <?php |
||
13 | class ListTemplate extends AbstractTemplate |
||
14 | { |
||
15 | public const TOP_ELEMENT_STYLE_LARGE = 'large'; |
||
16 | public const TOP_ELEMENT_STYLE_COMPACT = 'compact'; |
||
17 | |||
18 | /** |
||
19 | * @var string |
||
20 | */ |
||
21 | protected $topElementStyle; |
||
22 | |||
23 | /** |
||
24 | * @var \Kerox\Messenger\Model\Message\Attachment\Template\Element\ListElement[] |
||
25 | */ |
||
26 | protected $elements = []; |
||
27 | |||
28 | /** |
||
29 | * @var \Kerox\Messenger\Model\Common\Button\AbstractButton[] |
||
30 | */ |
||
31 | protected $buttons = []; |
||
32 | |||
33 | /** |
||
34 | * Liste constructor. |
||
35 | * |
||
36 | * @param \Kerox\Messenger\Model\Message\Attachment\Template\Element\ListElement[] $elements |
||
37 | * |
||
38 | * @throws \Kerox\Messenger\Exception\MessengerException |
||
39 | */ |
||
40 | 2 | public function __construct(array $elements) |
|
48 | |||
49 | /** |
||
50 | *@throws \Kerox\Messenger\Exception\MessengerException |
||
51 | * |
||
52 | * @return \Kerox\Messenger\Model\Message\Attachment\Template\ListTemplate |
||
53 | */ |
||
54 | 2 | public static function create(array $elements): self |
|
58 | |||
59 | /** |
||
60 | *@throws \Kerox\Messenger\Exception\MessengerException |
||
61 | * |
||
62 | * @return \Kerox\Messenger\Model\Message\Attachment\Template\ListTemplate |
||
63 | */ |
||
64 | 2 | public function setTopElementStyle(string $topElementStyle): self |
|
72 | |||
73 | /** |
||
74 | * @param \Kerox\Messenger\Model\Common\Button\AbstractButton[] $buttons |
||
75 | * |
||
76 | *@throws \Kerox\Messenger\Exception\MessengerException |
||
77 | * |
||
78 | * @return \Kerox\Messenger\Model\Message\Attachment\Template\ListTemplate |
||
79 | */ |
||
80 | 1 | public function setButtons(array $buttons): self |
|
88 | |||
89 | /** |
||
90 | * @throws \Kerox\Messenger\Exception\MessengerException |
||
91 | */ |
||
92 | 2 | private function isValidTopElementStyle(string $topElementStyle): void |
|
99 | |||
100 | 2 | private function getAllowedTopElementStyle(): array |
|
107 | |||
108 | 1 | public function toArray(): array |
|
122 | } |
||
123 |
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.