获取布局中的资产属性(Yii2)

In app\assets\LoginAsset

I appoint new property public $bodyCss = 'login';.

In my view i'm calling it by LoginAsset::register($this);. And in my layout i want to use $bodyCss here:

<body class="<?= /*get($bodyCss)*/ ?>">

If i'm calling var_dump($this->assetBundles) i see my ["bodyCss"]=> string(13) "login" property

but how to use it?

Any suggestions? Thank you!

I think you could use in this way

 <body class="<?= $this->assetBundles["bodyCss"]; ?>">