I want to access a session or Yii::$app
in a configuration file, for example ( config/main.php
or config/main-local.php
)!
Is this possible or not?
I want to check the session and make some style available!
'components' => [
'assetManager' => [
'assetMap' => [
'r.css' => Yii::$app->session['lang'] ? 'css/styleltr.css' : 'css/stylertl.css' ,
],
],
or how to do something like this in propertymanager ????
source
share