1 | <?php |
||
9 | class ElementList extends Template |
||
10 | { |
||
11 | const TOP_STYLE_COMPACT = 'compact'; |
||
12 | const TOP_STYLE_LARGE = 'large'; |
||
13 | |||
14 | /** |
||
15 | * @var Element[] |
||
16 | */ |
||
17 | private $elements; |
||
18 | |||
19 | /** |
||
20 | * @var ButtonModel|null |
||
21 | */ |
||
22 | private $button; |
||
23 | |||
24 | /** |
||
25 | * @var string |
||
26 | */ |
||
27 | private $topElementStyle; |
||
28 | |||
29 | /** |
||
30 | * @param Element[] $elements |
||
31 | * @param ButtonModel|null $button |
||
32 | * @param string $topElementStyle |
||
33 | */ |
||
34 | 11 | public function __construct(array $elements, ButtonModel $button = null, $topElementStyle = self::TOP_STYLE_LARGE) |
|
54 | |||
55 | /** |
||
56 | * @return Element[] |
||
57 | */ |
||
58 | 1 | public function getElements() |
|
62 | |||
63 | /** |
||
64 | * @return string |
||
65 | */ |
||
66 | 2 | public function getTopElementStyle() |
|
70 | |||
71 | /** |
||
72 | * @return null|ButtonModel |
||
73 | */ |
||
74 | 1 | public function getButton() |
|
78 | |||
79 | /** |
||
80 | * @return string |
||
81 | */ |
||
82 | 2 | public function getType() |
|
86 | |||
87 | /** |
||
88 | * @inheritdoc |
||
89 | */ |
||
90 | 1 | public function jsonSerialize() |
|
99 | } |
||
100 |