1 | <?php |
||
6 | class Liste extends Template |
||
7 | { |
||
8 | |||
9 | const TOP_ELEMENT_STYLE_LARGE = 'large'; |
||
10 | const TOP_ELEMENT_STYLE_COMPACT = 'compact'; |
||
11 | |||
12 | /** |
||
13 | * @var string |
||
14 | */ |
||
15 | protected $topElementStyle; |
||
16 | |||
17 | /** |
||
18 | * @var \Kerox\Messenger\Model\Message\Attachment\Template\Element\ListeElement[] |
||
19 | */ |
||
20 | protected $elements = []; |
||
21 | |||
22 | /** |
||
23 | * @var \Kerox\Messenger\Model\Common\Buttons\AbstractButtons[] |
||
24 | */ |
||
25 | protected $buttons = []; |
||
26 | |||
27 | /** |
||
28 | * Liste constructor. |
||
29 | * |
||
30 | * @param array $elements |
||
31 | */ |
||
32 | public function __construct(array $elements) |
||
40 | |||
41 | /** |
||
42 | * @param string $topElementStyle |
||
43 | * @return Liste |
||
44 | */ |
||
45 | public function setTopElementStyle(string $topElementStyle): Liste |
||
52 | |||
53 | /** |
||
54 | * @param string $topElementStyle |
||
55 | * @return void |
||
56 | * @throws \InvalidArgumentException |
||
57 | */ |
||
58 | private function isValidTopElementStyle(string $topElementStyle) |
||
65 | |||
66 | /** |
||
67 | * @return array |
||
68 | */ |
||
69 | private function getAllowedTopElementStyle(): array |
||
76 | |||
77 | /** |
||
78 | * @param \Kerox\Messenger\Model\Common\Buttons\AbstractButtons[] $buttons |
||
79 | * @return \Kerox\Messenger\Model\Message\Attachment\Template\Liste |
||
80 | * @internal param array $buttons |
||
81 | */ |
||
82 | public function setButtons(array $buttons): Liste |
||
89 | |||
90 | /** |
||
91 | * @return array |
||
92 | */ |
||
93 | public function jsonSerialize(): array |
||
109 | } |
||
110 |