1 | <?php |
||
32 | class Module implements ConfigProviderInterface, DependencyIndicatorInterface |
||
33 | { |
||
34 | /** |
||
35 | * Bootstrap Handle FlashMessenger session show. |
||
36 | * |
||
37 | * @param MvcEvent $e |
||
38 | */ |
||
39 | 15 | public function onBootstrap(MvcEvent $e) |
|
56 | |||
57 | /** |
||
58 | * Used to duplicate flashMessenger data as it shown and gone. |
||
59 | * |
||
60 | * @param Container $container |
||
61 | */ |
||
62 | 13 | private function duplicateFlashMessengerSessionData(Container $container) |
|
63 | { |
||
64 | 13 | $flashToolbarContainer = new Container('SanSessionToolbarFlashMessenger'); |
|
65 | 13 | foreach ($container->getArrayCopy() as $key => $row) { |
|
66 | 1 | foreach ($row->toArray() as $keyArray => $rowArray) { |
|
67 | 1 | if ($keyArray === 0) { |
|
68 | 1 | $flashToolbarContainer->$key = new SplQueue(); |
|
69 | 1 | } |
|
70 | 1 | $flashToolbarContainer->$key->push($rowArray); |
|
71 | 1 | } |
|
72 | 13 | } |
|
73 | 13 | } |
|
74 | |||
75 | /** |
||
76 | * Handle FlashMessenger data to be able to be seen in both "app" and toolbar parts. |
||
77 | * |
||
78 | * @param EventInterface $e |
||
79 | */ |
||
80 | 14 | public function flashMessengerHandler(EventInterface $e) |
|
91 | |||
92 | /** |
||
93 | * {@inheritdoc} |
||
94 | */ |
||
95 | 13 | public function getConfig() |
|
99 | |||
100 | /** |
||
101 | * {@inheritdoc} |
||
102 | */ |
||
103 | 13 | public function getModuleDependencies() |
|
107 | } |
||
108 |