Total Complexity | 4 |
Total Lines | 34 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
9 | class FlashAlertsHelper extends Helper |
||
10 | { |
||
11 | private $templating; |
||
12 | private $alertPublisher; |
||
13 | private $options = []; |
||
14 | |||
15 | public function __construct(EngineInterface $templating, AlertPublisher $alertPublisher, $template, $styles, $scripts) |
||
16 | { |
||
17 | $this->templating = $templating; |
||
18 | $this->alertPublisher = $alertPublisher; |
||
19 | $this->options = [ |
||
20 | 'use_styles' => $styles, |
||
21 | 'use_scripts' => $scripts, |
||
22 | 'template' => $template |
||
23 | ]; |
||
24 | } |
||
25 | |||
26 | public function renderFlashAlerts(array $options = []) |
||
31 | } |
||
32 | |||
33 | private function resolveOptions(array $options = []) |
||
34 | { |
||
35 | $this->options['alert_publisher'] = $this->alertPublisher; |
||
36 | |||
37 | return array_merge($this->options, $options); |
||
38 | } |
||
39 | |||
40 | public function getName() |
||
43 | } |
||
44 | } |
||
45 |