How to use Yii::$app->session['somename'] in yii2 propertymanager?
How to access some function in the PropertyManager?
class AppAsset extends AssetBundle{ public function getLang() { $currentLang = Yii::$app->session['lang']; if ($currentLang == 'fa' || $currentLang == 'ar') { return 'RTL'; } else { return 'LTR'; } } public $lang; public $basePath = '@webroot'; public $baseUrl = '@web'; public $css = [ 'css/iconSprite.min.css',
How to call getLang in css part?
source share