1 | <?php |
||
8 | class PersistentMenu implements ProfileSettingsInterface, \JsonSerializable |
||
9 | { |
||
10 | |||
11 | use ValidatorTrait; |
||
12 | |||
13 | /** |
||
14 | * @var string |
||
15 | */ |
||
16 | protected $locale; |
||
17 | |||
18 | /** |
||
19 | * @var bool |
||
20 | */ |
||
21 | protected $composerInputDisabled = false; |
||
22 | |||
23 | /** |
||
24 | * @var \Kerox\Messenger\Model\Common\Buttons\AbstractButtons[] |
||
25 | */ |
||
26 | protected $buttons = []; |
||
27 | |||
28 | /** |
||
29 | * PersistentMenu constructor. |
||
30 | * |
||
31 | * @param string $locale |
||
32 | */ |
||
33 | 2 | public function __construct(string $locale = self::DEFAULT_LOCALE) |
|
41 | |||
42 | /** |
||
43 | * @param bool $composerInputDisabled |
||
44 | * @return \Kerox\Messenger\Model\ProfileSettings\PersistentMenu |
||
45 | */ |
||
46 | 2 | public function setComposerInputDisabled(bool $composerInputDisabled): PersistentMenu |
|
52 | |||
53 | /** |
||
54 | * @param \Kerox\Messenger\Model\Common\Buttons\AbstractButtons[] $buttons |
||
55 | * @return \Kerox\Messenger\Model\ProfileSettings\PersistentMenu |
||
56 | */ |
||
57 | 2 | public function addButtons(array $buttons): PersistentMenu |
|
66 | |||
67 | /** |
||
68 | * @return array |
||
69 | */ |
||
70 | 2 | protected function getAllowedButtonsType(): array |
|
78 | |||
79 | /** |
||
80 | * @return array |
||
81 | */ |
||
82 | 1 | public function jsonSerialize(): array |
|
92 | } |
||
93 |