Conditions | 2 |
Paths | 2 |
Total Lines | 17 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
1 | <?php |
||
15 | public static function block() { |
||
16 | |||
17 | $popup = Template::group(); $icons = ['positive' => 'checkmark', 'negative' => 'warning']; |
||
18 | |||
19 | foreach (static::$items as $type => $item) { |
||
20 | |||
21 | $popup->add($block = View::get('Blocks\Utils\Popup')); |
||
22 | |||
23 | $block->type = $type; $block->text = Template::block($item['text']); |
||
24 | |||
25 | $block->title = ($item['title'] ?? null); $block->icon = $icons[$type]; |
||
26 | } |
||
27 | |||
28 | # ------------------------ |
||
29 | |||
30 | return $popup; |
||
31 | } |
||
32 | } |
||
34 |