DS
Но во ViewRenderer для layout ещё есть дополнительные параметры.
Size: a a a
DS
СП
DS
СП
DS
$viewRenderer->withLayout('@views/my-layout', ['currencyRate' => $rate])
СП
DS
СП
DS
СП
DS
СП
DS
СП
DS
DS
СП
DS
[
ViewRenderer::class => [
'__construct()' => [
'viewBasePath' => '@views',
],
'withLayout()' => ['@views/layout/main', ['currencyRate' => Currency::rate]]
],
]
DS
СП
[
ViewRenderer::class => [
'__construct()' => [
'viewBasePath' => '@views',
],
'withLayout()' => ['@views/layout/main', ['currencyRate' => Currency::rate]]
],
]