Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
10 / 10 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| Layout | |
100.00% |
10 / 10 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
10 / 10 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | namespace Apie\HtmlBuilders\Components; |
| 3 | |
| 4 | use Apie\HtmlBuilders\Components\Layout\Menu; |
| 5 | use Apie\HtmlBuilders\Components\Layout\TopBar; |
| 6 | use Apie\HtmlBuilders\Configuration\CurrentConfiguration; |
| 7 | use Apie\HtmlBuilders\Interfaces\ComponentInterface; |
| 8 | use Apie\HtmlBuilders\Lists\ComponentHashmap; |
| 9 | |
| 10 | class Layout extends BaseComponent |
| 11 | { |
| 12 | public function __construct( |
| 13 | string $pageTitle, |
| 14 | CurrentConfiguration $currentConfiguration, |
| 15 | ComponentInterface $contents |
| 16 | ) { |
| 17 | parent::__construct( |
| 18 | [ |
| 19 | 'title' => $currentConfiguration->getBrowserTitle($pageTitle), |
| 20 | ], |
| 21 | new ComponentHashmap([ |
| 22 | 'top' => new TopBar($currentConfiguration), |
| 23 | 'menu' => new Menu($currentConfiguration), |
| 24 | 'content' => $contents, |
| 25 | ]) |
| 26 | ); |
| 27 | } |
| 28 | } |