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