Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
12 / 12
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
TopBar
100.00% covered (success)
100.00%
12 / 12
100.00% covered (success)
100.00%
1 / 1
2
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
12 / 12
100.00% covered (success)
100.00%
1 / 1
2
1<?php
2namespace Apie\HtmlBuilders\Components\Layout;
3
4use Apie\HtmlBuilders\Components\BaseComponent;
5use Apie\HtmlBuilders\Components\Dashboard\RawContents;
6use Apie\HtmlBuilders\Configuration\CurrentConfiguration;
7use Apie\HtmlBuilders\Lists\ComponentHashmap;
8
9class TopBar extends BaseComponent
10{
11    public function __construct(
12        CurrentConfiguration $currentConfiguration
13    ) {
14        parent::__construct(
15            [
16                'dashboardUrl' => $currentConfiguration->getContextUrl('/'),
17            ],
18            new ComponentHashmap([
19                'logo' => new Logo($currentConfiguration),
20                'middle' => $currentConfiguration->shouldDisplayBoundedContextSelect()
21                    ? new BoundedContextSelect($currentConfiguration)
22                    : new RawContents('&nbsp;'),
23                'login' => new LoginSelect($currentConfiguration),
24            ])
25        );
26    }
27}