Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
7 / 7 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| IonicDesignSystemLayout | |
100.00% |
7 / 7 |
|
100.00% |
1 / 1 |
2 | |
100.00% |
1 / 1 |
| __construct | n/a |
0 / 0 |
n/a |
0 / 0 |
1 | |||||
| createRenderer | |
100.00% |
7 / 7 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | namespace Apie\CmsLayoutIonic; |
| 3 | |
| 4 | use Apie\HtmlBuilders\Assets\AssetManager; |
| 5 | use Apie\TwigTemplateLayoutRenderer\TwigRenderer; |
| 6 | use Twig\RuntimeLoader\RuntimeLoaderInterface; |
| 7 | |
| 8 | final class IonicDesignSystemLayout |
| 9 | { |
| 10 | /** |
| 11 | * @codeCoverageIgnore |
| 12 | */ |
| 13 | private function __construct() |
| 14 | { |
| 15 | } |
| 16 | |
| 17 | public static function createRenderer( |
| 18 | RuntimeLoaderInterface $runtimeLoader, |
| 19 | ?AssetManager $assetManager = null |
| 20 | ): TwigRenderer { |
| 21 | $assetManager ??= new AssetManager(); |
| 22 | return new TwigRenderer( |
| 23 | __DIR__ . '/../resources/templates', |
| 24 | $assetManager->withAddedPath(__DIR__ . '/../resources/assets'), |
| 25 | $runtimeLoader, |
| 26 | 'Apie\HtmlBuilders\Components\\' |
| 27 | ); |
| 28 | } |
| 29 | } |