СП
Size: a a a
СП
СП
СП
DS
СП
СП
DS
DS
СП
СП
class CurrencyRateInjection implements InjectionInterface
{
private CurrencyService $service;
public function __construct(CurrencyService $service)
{
$this->service = $service;
}
...
public function getParams(): array
{
return ['rate' => $this->service->getRate()];
}
}
$rate
.СП
$csrf
и регистрируется мета-тег тут же.СП
params.php
красиво:'viewRenderer' => [
'viewBasePath' => '@views',
'layout' => '@views/layout/main',
'contentInjections' => [
CsrfInjection::class,
],
'layoutInjections' => [
UserInjection::class,
CurrencyRateInjection::class,
],
],
DS
СП
DS
СП
СП
DS
СП