Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

Commit

Permalink
Adjust config (#265)
Browse files Browse the repository at this point in the history
  • Loading branch information
terabytesoftw committed Jun 23, 2020
1 parent a8e0332 commit 9eb4618
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
23 changes: 14 additions & 9 deletions config/params.php
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

return [
'aliases' => [
// @root needs to be redefined in the application config
Expand All @@ -11,15 +13,18 @@
'@npm' => '@root/node_modules',
'@web' => '/',
],
'htmlRenderer' => [
'templates' => [
'default' => [
'callStackItem',
'error',
'exception',
'previousException'
],
'path' => __DIR__ . '/../src/ErrorHandler/templates',

'yiisoft/yii-web' => [
'htmlRenderer' => [
'templates' => [
'default' => [
'callStackItem',
'error',
'exception',
'previousException'
],
'path' => __DIR__ . '/../src/ErrorHandler/templates',
]
]
]
];
5 changes: 4 additions & 1 deletion config/web.php
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

use Yiisoft\Aliases\Aliases;
use Yiisoft\Yii\Web\ErrorHandler\HtmlRenderer;
use Yiisoft\Yii\Web\ErrorHandler\ThrowableRendererInterface;
Expand All @@ -15,10 +17,11 @@
],

ThrowableRendererInterface::class => HtmlRenderer::class,

HtmlRenderer::class => [
'__class' => HtmlRenderer::class,
'__construct()' => [
$params['htmlRenderer']['templates'] ?? [],
$params['yiisoft/yii-web']['htmlRenderer']['templates'],
],
]
];

0 comments on commit 9eb4618

Please sign in to comment.